Skip to content

Commit

Permalink
[auto commit] dow30_daily reconciliation & execution on 2024-01-11
Browse files Browse the repository at this point in the history
  • Loading branch information
enzbus committed Jan 11, 2024
1 parent ad67d3e commit a918f04
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 1 deletion.
35 changes: 34 additions & 1 deletion examples/strategies/dow30_daily_initial_holdings.json
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,43 @@
"PG": 0.0,
"TRV": 0.0,
"UNH": 101162.79541015631,
"USDOLLAR": -101.96599828524859,
"USDOLLAR": -101.965997224179,
"V": 74986.510345459,
"VZ": 0.0,
"WBA": 0.0,
"WMT": 9573.599853515618
},
"2024-01-11 14:30:00+00:00": {
"AAPL": 238771.19140625006,
"AMGN": 31860.14923095701,
"AXP": 0.0,
"BA": 0.0,
"CAT": 0.0,
"CRM": 92727.99999999994,
"CSCO": 48202.68013643065,
"CVX": 0.0,
"DIS": 0.0,
"DOW": 0.0,
"GS": 0.0,
"HD": 118910.96878051753,
"HON": 0.0,
"IBM": 0.0,
"INTC": 0.0,
"JNJ": 0.0,
"JPM": 0.0,
"KO": 0.0,
"MCD": 1.3733370566116348e-12,
"MMM": 0.0,
"MRK": 0.0,
"MSFT": 294904.0,
"NKE": 521.1000061035171,
"PG": 0.0,
"TRV": 0.0,
"UNH": 100792.44091796882,
"USDOLLAR": -0.32134321440636177,
"V": 75125.17758178717,
"VZ": 0.0,
"WBA": 0.0,
"WMT": 9519.650360107413
}
}
33 changes: 33 additions & 0 deletions examples/strategies/dow30_daily_target_weights.json
Original file line number Diff line number Diff line change
Expand Up @@ -361,5 +361,38 @@
"VZ": 1.8584366133436376e-10,
"WBA": 3.019733835848589e-10,
"WMT": 0.009463332388278792
},
"2024-01-11 14:30:00+00:00": {
"AAPL": 0.23609506346227147,
"AMGN": 0.03150306671474795,
"AXP": 9.608848322359098e-10,
"BA": 2.0889369540688844e-09,
"CAT": 8.5966575482134e-10,
"CRM": 0.09190500756520693,
"CSCO": 0.04766252193099425,
"CVX": 9.334730879058467e-10,
"DIS": 1.3991956697611413e-09,
"DOW": 1.4652926110058205e-09,
"GS": 9.124607284414802e-10,
"HD": 0.1176547372764344,
"HON": 6.641290614649437e-10,
"IBM": 5.171669849146346e-10,
"INTC": 1.6769323374728451e-09,
"JNJ": 1.3483393905656349e-09,
"JPM": 2.019223121076852e-09,
"KO": 9.713889753833306e-10,
"MCD": 3.4087138866958875e-09,
"MMM": 6.16938456123863e-10,
"MRK": 1.0789050479426178e-09,
"MSFT": 0.2915984947307798,
"NKE": 0.0003275688816463551,
"PG": 7.848473476424704e-10,
"TRV": 7.008682658572608e-10,
"UNH": 0.0996629335847343,
"USDOLLAR": 7.431237560864926e-09,
"V": 0.07428045479179092,
"VZ": 6.746984316367384e-10,
"WBA": 1.0694099966647328e-09,
"WMT": 0.009310119478685052
}
}
1 change: 1 addition & 0 deletions examples/strategies/strategy_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ def backtest_from_day(self, day):
# select same day if available, else last one before
weights_day = sorted(
[d for d in self.all_target_weights if d <= day])[-1]
logger.info('Using target weights of day %s', weights_day)
day_target_weigths = pd.Series(self.all_target_weights[weights_day])
day_universe = [
el for el in day_init_holdings.index if not el == self.cash_key]
Expand Down

0 comments on commit a918f04

Please sign in to comment.