mirror of
https://github.com/wassname/options_backtester.git
synced 2026-07-30 12:20:10 +08:00
Fixed example notebook. Changed balance column name.
This commit is contained in:
@@ -114,7 +114,7 @@ class Backtest:
|
||||
money_total = total_value + self.current_cash
|
||||
|
||||
row = pd.Series({
|
||||
'total_value': total_value,
|
||||
'total value': total_value,
|
||||
'cash': self.current_cash,
|
||||
'capital': money_total,
|
||||
}, name=date)
|
||||
|
||||
@@ -921,7 +921,7 @@
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"bt.run(initial_capital=1_000_000, periods=None)"
|
||||
"bt.run(periods=None)"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1693,7 +1693,7 @@
|
||||
],
|
||||
"source": [
|
||||
"# No rebalancing\n",
|
||||
"bt.run(initial_capital=1_000_000, periods=None)"
|
||||
"bt.run(periods=None)"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -2013,7 +2013,7 @@
|
||||
],
|
||||
"source": [
|
||||
"# Monthly rebalancing\n",
|
||||
"bt.run(initial_capital=1_000_000, periods=1)"
|
||||
"bt.run(periods=1)"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -2257,7 +2257,7 @@
|
||||
],
|
||||
"source": [
|
||||
"# Bi-annual rebalancing\n",
|
||||
"bt.run(initial_capital=1_000_000, periods=6)"
|
||||
"bt.run(periods=6)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user