Skip to content

Commit 73fbb2d

Browse files
committed
add expected_returns and risk_model to make_rebalance
1 parent 210c058 commit 73fbb2d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/empyrial/main.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ def __init__(
123123
self.diversification,
124124
self.min_weights,
125125
self.max_weights,
126+
self.expected_returns,
127+
self.risk_model
126128
)
127129

128130

@@ -808,6 +810,8 @@ def make_rebalance(
808810
div,
809811
min,
810812
max,
813+
expected_returns,
814+
risk_model,
811815
) -> pd.DataFrame:
812816
sdate = str(start_date)[:10]
813817
if rebalance[0] != sdate:
@@ -850,6 +854,8 @@ def make_rebalance(
850854
diversification=div,
851855
min_weights=min,
852856
max_weights=max,
857+
expected_returns=expected_returns,
858+
risk_model=risk_model,
853859
)
854860

855861
except TypeError:
@@ -863,6 +869,8 @@ def make_rebalance(
863869
diversification=div,
864870
min_weights=min,
865871
max_weights=max,
872+
expected_returns=expected_returns,
873+
risk_model=risk_model,
866874
)
867875

868876
output_df["{}".format(dates[i + 1])] = portfolio.weights
@@ -878,6 +886,8 @@ def make_rebalance(
878886
diversification=div,
879887
min_weights=min,
880888
max_weights=max,
889+
expected_returns=expected_returns,
890+
risk_model=risk_model,
881891
)
882892

883893
except TypeError:
@@ -890,6 +900,8 @@ def make_rebalance(
890900
diversification=div,
891901
min_weights=min,
892902
max_weights=max,
903+
expected_returns=expected_returns,
904+
risk_model=risk_model,
893905
)
894906

895907
output_df["{}".format(TODAY)] = portfolio.weights

0 commit comments

Comments
 (0)