Giter VIP home page Giter VIP logo

Comments (9)

tudorelu avatar tudorelu commented on July 19, 2024 1

Hi @twopirllc, this sounds interesting I'll have a look!

from pyjuque.

twopirllc avatar twopirllc commented on July 19, 2024 1

@tudorelu,

Definitely not an overkill, really thanks for the detailed explanation. It
put me at ease with respect to the speed of calculation / perceived
bottleneck as I haven't tested their speed myself.

Cool.

So rewriting some of them in a recursive fashion to compute 'in real time' - at least for the indicators that it is possible - might be a use case for python

Yeah.

I imagine that a well thought out algorithm can perform without issues in
the current scenario, with a small number of pairs - however you're right,
if you want to compute hundreds of indicators on dozens of pairs every
minute

Right. I am also building out a Watchlist Class that manages a group of tickers and fetches data from AlphaVantage (currently), and processes TA assigned to it. It's a work in progress with the goal to add more data sources, brokers, and an event loop for live or simulation.

Again thanks for this answer and your effort of converting TA-lib to python

  • I am almost certainly using this library for pyjuque as I wanted to
    change pyti for a long time - I might even give it a try to update some
    indicators to real-time!

Thanks! Yeah, TA Lib also does not easily install some systems. So I made Pandas TA to have the same level of accuracy as TA Lib, ease of use, and compatibility with the Python Data Science / ML / FinTech ecosystem. I have other cool features in mind to add. I just need to make time to program them. Looking forward to what you produce.

Thanks,
KJ

from pyjuque.

twopirllc avatar twopirllc commented on July 19, 2024

@tudorelu,

If you have any questions, let me know.

KJ

from pyjuque.

tudorelu avatar tudorelu commented on July 19, 2024

Definitely - just had a thought, wanted to see your take on it... you know with real time trading sometimes you want to compute an indicator value only for the last Candle for example - because you already computed it for the previous ones. How many indicators in your library would have that capability, or should most of them be rewritten to allow for that? (I imagine a lot of devs would like to have this ability in a TA library..)

from pyjuque.

twopirllc avatar twopirllc commented on July 19, 2024

@tudorelu,

Excellent question.

I imagine a lot of devs would like to have this ability in a TA library..

No doubt!

Yet, in my experience of both creating indicators and reverse engineering them from TA Lib, Trading View, et al, it is not possible for many indicators.

In fact it was a discussion on my repo as well. It's the first Pinned Issue: How to utilize this Framework for live ticks #87. Unfortunately, I haven't had much chance to personally address this issue more. Hopefully soon! 🤞

Brokers, Charting Software, and Web Platforms

Traditional Broker Platforms like Trade Station, Think or Swim, Interactive Brokers as well as specialty charting platforms like MultiCharts, Sierra Charts et al are a mix of C, C++, C#, and Java typically. I have not found anything online yet on how any of them do it, but it's unlikely a concern considering their choice of language.

For the web trading platform Trading View, this is how they handle the Execution of Pine Script

More specifically:
Screen Shot 2020-09-06 at 9 05 07 AM

Requirements or Limitations

I suppose it really depends on your requirements or limitations.

If the requirement is truly HFT, microseconds trading with a dedicated machine as close to the exchange as possible, then Python is obviously not the choice. However if it is tick data, then you should be fine in many cases with performant hardware. Lastly for 1 minute and higher time frames, I wouldn't be concerned.

For instance, I am running a 2013 Mac Book Pro with 4G RAM, 4 Cores. When using Pandas TA, I can process over a hundred different indicators in about 4secs with ohlcv data containing 700 rows. However in reality, one would have a small sample of indicators to use and it takes my machine microseconds.

For example, when I used this subset of indicators (max period of 200) with 700 bars I got around 50 ms (or 0.05 secs) to process them. When I take 210 bars, 10 extra bars for buffer, I get around 30 ms (or 0.03 secs). Even with my hardware limitation, TA speed bottlenecks are trivial.

Screen Shot 2020-09-06 at 9 24 35 AM

But if you have a small portfolio to live track and calculate as a scanner list, of course it may take marginally longer to process them in a blocking manner.

How many indicators in your library would have that capability, or should most of them be rewritten to allow for that?

So in my opinion, I don't think it is necessary to rewrite the few that may benefit. Even with older hardware, TA is pretty fast.

Apologies if this was overkill...
KJ

from pyjuque.

tudorelu avatar tudorelu commented on July 19, 2024

from pyjuque.

TekpreXyz avatar TekpreXyz commented on July 19, 2024

hi all nice guy!
do you know this project?
https://github.com/freqtrade/freqtrade
Maybe you can take some ispiration from.

from pyjuque.

TekpreXyz avatar TekpreXyz commented on July 19, 2024

another interesting source is 👍
https://towardsdatascience.com/how-to-create-a-fully-automated-ai-based-trading-system-with-python-708503c1a907
https://www.freqtrade.io/en/latest/strategy-customization/
https://github.com/ccxt/ccxt
https://www.shrimpy.io/demo

from pyjuque.

TekpreXyz avatar TekpreXyz commented on July 19, 2024

https://medium.com/coinmonks/python-scripts-for-ccxt-crypto-candlestick-ohlcv-charting-data-83926fa16a13

from pyjuque.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.