Skip to content

Commit 00893f2

Browse files
committed
refactor out part of forecast pandl calculator fix small bug
1 parent f4a8e82 commit 00893f2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

systems/accounts/account_forecast.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ def pandl_for_instrument_forecast(
255255
)
256256
account_curve = pandl_for_position(
257257
notional_position=notional_position,
258+
average_notional_position=average_notional_position,
258259
SR_cost=SR_cost,
259260
fx=fx,
260261
daily_returns_volatility=daily_returns_volatility,
@@ -302,17 +303,16 @@ def _get_normalised_forecast(
302303

303304
def pandl_for_position(
304305
notional_position: pd.Series,
306+
average_notional_position,
305307
price: pd.Series,
306308
capital: float = ARBITRARY_FORECAST_CAPITAL,
307309
fx=arg_not_supplied,
308310
daily_returns_volatility: pd.Series = arg_not_supplied,
309-
SR_cost=0.0,
311+
SR_cost=0.0,
310312
delayfill=True,
311313
value_per_point=ARBITRARY_VALUE_OF_PRICE_POINT,
312314
) -> accountCurve:
313315

314-
average_notional_position = notional_position.abs().mean()
315-
316316
pandl_calculator = pandlCalculationWithSRCosts(
317317
price,
318318
SR_cost=SR_cost,

0 commit comments

Comments
 (0)