Comments (3)
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.
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.
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)
- [Live Mode] Session terminated as the result of an uncaught exception HOT 2
- After a position opened using different time window in order to check situation HOT 2
- There is no bitget example HOT 1
- Kraken data HOT 1
- Integrating Forex data from a Oanda API HOT 1
- linux/arm64 docker image HOT 4
- Live-trading plugin cannot be run on ARM platform HOT 1
- fee = config['env']['exchanges'][self.exchange]['fee']. KeyError: None HOT 2
- Add tradingview-webhook HOT 2
- get_cadles for > 1m routes does not work due to some legacy code HOT 1
- when running paper-trade mode, DELETE requests lead to unhandled exception (err 500) HOT 2
- wrong period starts for 45m candles in PAPERTRADE mode HOT 11
- Option Support HOT 2
- circular dependency with python 3.11 HOT 3
- Bug - link not working HOT 4
- Broken link "Why Jesse" on the homepage HOT 1
- binance does not offer 3h candles for 30m extra HOT 1
- Maximum recursion error when gathering historical data HOT 1
- Minor annoyance when gathering data HOT 1
- CandleNotFoundInExchange for any timeframe, with any altcoin using Coinbase Spot HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jesse.