You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
readability with a maximum line length of 120 characters.
16
-
</li>
10
+
<li>Follow <ahref="https://peps.python.org/pep-0008/" target="_blank" rel="nofollow">PEP8-style</a> readability with a maximum line length of 120 characters.</li>
17
11
<li>Add a leading underscore to private class members.</li>
18
12
<li>Keep total backtest runtime under 1 hour.</li>
19
13
<li>
20
-
Use the <ahref="/docs/v2/writing-algorithms/reality-modeling/transaction-fees/key-concepts">default transaction fee model</a>.
21
-
Do not override fee models.
14
+
Use the <ahref="/docs/v2/writing-algorithms/reality-modeling/key-concepts">default models</a>.
15
+
Do not override models to artificially improve performance. For example, do not override the <ahref="/docs/v2/writing-algorithms/reality-modeling/transaction-fees/key-concepts">transaction fees model</a> to reduce/eliminate fees or the <ahref="/docs/v2/writing-algorithms/reality-modeling/buying-power">buying power model</a> to increase leverage.
22
16
</li>
23
17
<li>
24
18
Strategies must not add or modify <ahref="/docs/v2/writing-algorithms/portfolio/cashbook">CashBook cash balances</a> during a backtest (no cash deposits or withdrawals).
25
-
Initial capital must be set only via <code>self.set_cash()</code>.
19
+
Initial capital must be set only via <code>self.set_cash()</code> or <code>self.set_account_currency()</code>.
26
20
</li>
27
21
<li>If the algorithm has regular rebalances (weekly, monthly, quarterly, etc), call your rebalance logic in <ahref='/docs/v2/writing-algorithms/key-concepts/event-handlers#07-Warmup-Finished-Event'>on_warmup_finished</a> so the start of the equity curve isn't flat.</li>
0 commit comments