Open spickering-git opened 6 years ago
iqfeed data integrity check
Done, in today commit.
Model and realtime comparison in a notebook dashboard format
I've implemented some fixes to add an ability to compare real-time and SmartCampaign positions.
Here is a sample notebook: https://10.0.1.2:8888/notebooks/smart_campaign_generation/ES_SmartCampaign_RelStrength_V5_real_payoff.ipynb#Plot-real-payoff-diagram-of-Smart-Campaign
How it works:
Notes
CampaignReport(CAMPAIGN_NAME, datasource)
is irrelevant for Smart Campaigns, because it doesn't take into account the dynamic alpha changes. It might be used just for actual exposure estimation of alphas. Settlement PnL and Model PnLs are inaccurate.@alexveden Please make an option to run iqfeed collection in delayed mode to poll history to maintain delayed data up to date
We also need to fill the 'contract_bars' collection in tmldb_v2, Please advise me when you will be making this change. When the 'contract_bars' collection is being filled:
we will no longer run the CQG end of day contract update to 'tmldb_v2.contract_bars' or the live update to 'tmldb_test.futurebarcol'.
:zap: @alexveden, you will need to make sure the V1 model does NOT point to 'tmldb_test.futurebarcol' and references 'tmldb_v2.contract_bars' instead :zap:
I will point the realtime trading monitor to the 'contract_bars' in tmldb_v2 instead of 'futurebarcol_iq' n tmldb_test
Can we have iqfeed pull in just the front month of the eurodollar futures and fill the database with the settlement or close for each single day? Then we will have the updated risk free rate. I'm not sure right now if you use the legacy collection in tmldb_v2 'option_input_data'. If not we can just fill the quotes_riskfreerate collection. We need the latest risk free rate for the realtime.
CQG is being turned off Dec 31
@alexveden We need to be able to generate payoff for multi-instrument campaign to have comparison to realtime for reconciling.
I think we should do this by simply filter for the instruments right at the top level of requesting for the payoff. This would make it simple to generate a payoff for each instrument in the multi-instrument campaign. When performing:
def load_campaign(self, campaign_name, date=None, ticker=None, campaign_dict=None, account_name=None ):
....
acct = exc_mgr.account_load(account_name) #pass ticker in here and filter
We would be able to filter for alphas that are associated with a specified instrument. When I was testing I saw the campaign is queried from 'campaigns' and not 'campaigns_smart' so there isn't a product field to narrow the alpha query.
@nikolas-joyce suggested that we just take position from accounts_positions or accounts_positions_archive. That way positions are rounded for money management.
What is the best approach to make the payoff work for multi instrument campaigns? Is there a quick way to make this work?
So, I think we can take the ideas of multiproduct reconciliation from https://github.com/trendmanagement/tmqrexo_alexveden/blob/new_mongo/backtester/reports/campaign_real_compare_report.py#L181
and merge them with
1) https://github.com/trendmanagement/Tmqr-framework-2/issues/96 The last comment on this issue re: risk free rate. Can please let me know how we will address.
2) iqfeed data integrity check you were going to possibly add a data check here https://github.com/trendmanagement/Tmqr-framework-2/blob/d8f04a9ec8a5a6f038c91a458c331999bc4ae961/tmqrscripts/data/run_iqfeed_updates.py#L201 And we also need a check at the database level. Let me know if you want me to work on this one.
3) you were going to come up with a simple log consolidator.
4) Model and realtime comparison in a notebook dashboard format