Cross-Sectional backtests in python

preview_player
Показать описание
We build a simple backtesting script to test cross-sectional trading strategies in pure python. No libraries required!

⭐ Code:

⏰ Timestamps:

00:00 - Intro
01:30 - Calculating Indicators
06:00 - Backtest Loop
22:30 - Equity Curve
22:53 - Increasing backtest realism
Рекомендации по теме
Комментарии
Автор

I can't get the number of trades your getting. They all seem to be on the same day instead of multiple days. It's a great demonstration of how you can get around the barriers or limitations of the libraries.

rverm
Автор

I learned numpy argpartition today, thank you!

jerrywang
Автор

hmm could i create series of aggregated time frames, highest ( top row) to lowest (last row) giving the value of the indicator last or current close price?

tessalittle