Giter Club home page Giter Club logo

Comments (3)

emansammuta100533 avatar emansammuta100533 commented on May 14, 2024

I noticed that the data only goes back to 2020-02-06 even tough I specified from 2020-01-01, also had to remove the ('Binance', 'BTCUSDT', anchor_timeframe('4h')), from extra_candles for the backtest to execute.

from jesse.

saleh-old avatar saleh-old commented on May 14, 2024

Maybe I need to change the behavior somehow or mention it in the docs. Here's the reason:

For example when your backtest starts since 2020-01-01 you need data from an earlier date. How early? 210 candles earlier. Which timeframe? The biggest timeframe you're using in your backtest. For example if 4h is the biggest timeframe you're using, you need to have candles present since 35 days earlier than 2020-01-01. This is to make sure that there will be enough data to actually execute the strategy since the very first day of your backtest.

To make sure you won't be bothered by this, simply import more candles. For example in the case of Binance, import since 2018.

Also when importing candles at what time frame are they being downloaded at?

1m timeframe only. All the other timeframes will be generated during your backtest. This is to prevent the look-ahead bias. It also gives more flexibility to add support for all timeframes even if the exchange doesn't offer it in their API.

from jesse.

emansammuta100533 avatar emansammuta100533 commented on May 14, 2024

Thanks for the explanation and yes I think best is to add this explanation to the documentation as well, cheers.

from jesse.

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.