Back to Community
How to use schedule_function to run every X days?

How can I use schedule_function to run , for example, every 40 days?

3 responses

And to make sure that it fires on a business day.

Try attached code. N is set to run every 7 days that market is open.

Richard

Clone Algorithm
19
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 5671c7bafbdf16116294c925
There was a runtime error.

A question to the Quantopian developers? Is it possibile to code an own date_rule? Could you provide us with some examples?

Thanks
Costantino