Skip to content

Commit

Permalink
Chore: Make release 1.0.110
Browse files Browse the repository at this point in the history
  • Loading branch information
martinroberson committed Aug 13, 2024
1 parent b8f6251 commit 9e59eef
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions gs_quant/backtests/generic_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
from gs_quant.common import ParameterisedRiskMeasure, RiskMeasure
from gs_quant.context_base import nullcontext
from gs_quant.datetime.relative_date import RelativeDateSchedule
from gs_quant.instrument import Instrument
from gs_quant.markets import PricingContext, HistoricalPricingContext
from gs_quant.markets.portfolio import Portfolio
from gs_quant.risk import Price
Expand Down Expand Up @@ -863,10 +862,7 @@ def _process_triggers_and_actions_for_date(self, d, strategy, backtest, risks):
hedge.exit_payment.scale_date = None
else:
new_notional = getattr(p.trade, p.scaling_parameter) * -scaling_factor
scaled_trade = p.trade.as_dict()
scaled_trade[p.scaling_parameter] = new_notional
scaled_trade = Instrument.from_dict(scaled_trade)
scaled_trade.name = p.trade.name
scaled_trade = p.trade.clone(**{p.scaling_parameter: new_notional, 'name': p.trade.name})
for day in p.dates:
backtest.add_results(day, p.results[day] * -scaling_factor)
backtest.portfolio_dict[day] += Portfolio(scaled_trade)
Expand Down

0 comments on commit 9e59eef

Please sign in to comment.