Giter Site home page Giter Site logo

Comments (5)

Kismuz avatar Kismuz commented on June 12, 2024

@JacobHanouna ,

I can understand the logic of syncing different data stream of the same timeframe to keep everything in order. but not for different timeframes.

  • sync for different timeframes is just not implemented. Only sensible approach I see here is to resmaple all streams to one common timeframe duration. In this particular case it will probably be upsampling daily data to minute timeframes (simply put, you'll end up with same repeated 1 min bar for entire single day).

from btgym.

JaCoderX avatar JaCoderX commented on June 12, 2024

is there a true necessity for doing the intersection sync? I mean if I take it off or do some kind of sync by timeframe groups?

from btgym.

JaCoderX avatar JaCoderX commented on June 12, 2024

@Kismuz,
Just for adding more information to the topic.

If I use the Backtrader native resample filter from within the Strategy class It sync and preform well with BTgym. So I know BTgym can handle working on different timeframes.

As a workaround I can upsample the data to 1 min outside of BTgym and then resample it back in the strategy.

This shows me that there is no fundamental reason why different timeframes shouldn't work together. plus the fact that the intersection sync happens only in BTgymMultiData made me question if it is really needed?

from btgym.

Kismuz avatar Kismuz commented on June 12, 2024

Intersection is just simplest method to ensure nn model gets consistent inputs on every timestep. I you can manage feeding different streams consistently by using backtrader resampling feature - it is just fine.

from btgym.

JaCoderX avatar JaCoderX commented on June 12, 2024

As a workaround I can upsample the data to 1 min outside of BTgym and then resample it back in the strategy.

In the last couple of days I tested this workaround idea and it seem to work quite well.

IMO there is a valid case of working with data from different timeframes, simply because not all 'data as information' can be collected in such low timeframes. So for real world application it is necessary to have an option to use all available data even if from different time resolution.

For now the Backtrader resample option is a good workaround but it comes with a noticeable performance hit due to the fact that this expensive operation need to be done on every new sample.

from btgym.

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.