trendmanagement / Tmqr-framework-2

3 stars 0 forks source link

Disconnect between updating accounts_positions collection and Campaigns containing V2 Alphas #59

Closed spickering-git closed 6 years ago

spickering-git commented 6 years ago

There is a disconnect between updating accounts_positions collection and the updating of Campaigns containing V2 Alphas.

@alexveden, you have a script that updates the accounts_positions collection after the Campaigns are updated. This needs to be adjusted to take into account V2 alpha updates.

The accounts_positions did not reflect the true Campaign position for 'CL_Bidirectional_W_Risk_Reversals V1' until we ran the notebook https://10.0.1.2:8888/notebooks/account_management/view_account_positions.ipynb with

positions = exmgr.account_positions_process(write_to_db=True)

alexveden commented 6 years ago

Obviously, V2 positions are calculated only after V1 exos/alphas calculation, so you have delay and must wait for V1 results in V2 alphas.

I suggest to call exmgr.account_position_process(True) directly from framework V2 script (like this: https://github.com/trendmanagement/tmqrexo_alexveden/blob/new_mongo/scripts/exo_builder.py#L230)

spickering-git commented 6 years ago

fixed