Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bt.algos.RunAfterDate can not update bt.backtest.Result ( 'Start', 'CARG' etc ) #398

Open
pinedance opened this issue Dec 20, 2022 · 0 comments

Comments

@pinedance
Copy link

I am backtesting some momentum strategies with bt package. As you know, momentum strategies require a longer period of data than the trading period. So I added bt.algos.RunAfterDate to my strategies.

I expected bt.backtest.Result should be chaged when bt.algos.RunAfterDate was added. But Start date of Result was still first date of the data. I doubt the accuracy of the CAGR value. Because CAGR is mostly affected by the trading period.

I hope this part will be fixed.

# Pseudocode
# When first date of the data is 2000-01-01 ...
my_strategy = [
    ...
    bt.algos.RunAfterDate("2001-01-01")
    ...
]
# Result of my backtest
Stat     my_strategy
-----    --------------
Start    2000-01-01       # not 2001-01-01
...
CAGR     7.25             # derived based on data period or trading period?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant