trendmanagement / Tmqr-framework-2

3 stars 0 forks source link

opt_codes failure #60

Closed spickering-git closed 6 years ago

spickering-git commented 6 years ago

@alexveden when using opt_codes filter where one of the filters is a space ' ' or " " { 'instrument':'US.ES', 'opt_codes':['EW','EW1','EW2','EW3','EW4',' '] }, { 'instrument':'US.6E', 'opt_codes':['EUU',' '] }, { 'instrument':'US.6B', 'opt_codes':['GBU',' '] }, { 'instrument':'US.6C', 'opt_codes':['CAU',' '] }, { 'instrument':'US.6A', 'opt_codes':['ADU',' '] }, { 'instrument':'US.6J', 'opt_codes':["JPU"," "] },

These all fail to be able to query an opt_code of the space. How can we get it to work with this.

alexveden commented 6 years ago

These all fail to be able to query an opt_code of the space. How can we get it to work with this.

When I was designing the framework, I've decided to avoid 'space' in opt_code. I've stipped all spaces in opt_codes at the import stage, so opt_code=' ' becomes '' for all contracts.

Since opt_code is a part of option ticker, that will bad design to have spaces in ticker names: US.C.F-ZB-H11-110322.110121@89.0 <- no opt_code here US.C.F-ZB-H11-110322.110121.@89.0

spickering-git commented 6 years ago

got it, that is clear.