trendmanagement / Tmqr-framework-2

3 stars 0 forks source link

We need to estimate the number of transactions and the costs of the v2 Task for Nov8 #83

Open nikolas-joyce opened 6 years ago

nikolas-joyce commented 6 years ago

we believe on average we do not have to exit every long OTM option that the model calls for and for this reason we may be over estimating the total commission cost in the event the model exits then reenters options which are OTM. we cannot seem to extract a trade count to be able to compare the number of trades executed to model required. Task : Calculate the Model required trade stat. We need a count of how many trades the model is requiring so we can see how many fewer we do in practice.

Task : Confirm that cost are now included in V2 hedge legs. Task: Constuct a notebook that lets the user view the number of options exited below some defined tick level. say the total trade count over a window is 2000 trades and 600 are exits of options below 3 ticks we can conclude the true trade count is closer to 1400...

nikolas-joyce commented 6 years ago

Task the bigger task is to establish how many required options are unnecessary trades. In others words how often are we selling (exiting) options below 2-5 ticks and then reentering these OTM options. I think we could probably reduce the commissions costs in the model by 50-70% is we correctly accounted for these low risk options .

Take for example this CL risk reversal which is used to hedge a long options strategy. image compare it to the hedge version of this risk reversal below. image

the passive version does +$25000 the active version does -$27000. In all likelihood we could hold the passive continuously and only remove the short put when we exit the futures and end with a greatly reduces commission cost. it is unlikely this maneuver would cause the passive version to drop from +25000 to -27000.

the theme is do the open selling for premium collection but recycle the OTM options wings so as to reduce the overall cost.

nikolas-joyce commented 6 years ago

I have done some work on this issue and i think we can dramatically reduce the required trades in risk reversals and put cal spreads by treating the short options/ premium collection component of the spreads separately from the long option premium buying legs of the spread.

I am hoping we can accomplish both of these tasks in the same script so the transitions to the cost sensitive V2 legs will be smooth. Essentially i am proposing to leave the long premium legs in place (permanently) and dynamically adjust the short options legs. here is an example of the short premium position management... https://10.0.1.2:8889/notebooks/Kelt_Risk_Reversals/SmartEXO-CallSpread-KeltnerChannel_for_shorts_template%20for%20short%20legs.ipynb

here is an example of the long premium management... https://10.0.1.2:8889/notebooks/indexes/EXO%20Vanilla%20EnhancementSpread_DT_short_Template_for%20_long%20legs.ipynb Task can you build a notebook so that i can do both of these tasks in a single script/ notebook so that i can replace the current v2 risk reversals and call/put spreads to be more sensitive to the total cost..

alexveden commented 6 years ago

Task : Calculate the Model required trade stat. We need a count of how many trades the model is requiring so we can see how many fewer we do in practice.

Done I've implemented transaction list for alpha/index position, now you can analyze it directly. And if you'd like I can create CSV export for Excel.

Task : Confirm that cost are now included in V2 hedge legs.

Confirmed According to this notebook https://10.0.1.2:8889/notebooks/tools/alpha_costs_diagnostics.ipynb alphas still have no costs settings in contexts but all of them use default settings (3.0 per contract / option)

Task: Constuct a notebook that lets the user view the number of options exited below some defined tick level. say the total trade count over a window is 2000 trades and 600 are exits of options below 3 ticks we can conclude the true trade count is closer to 1400...

I have created 2 versions, one for indexes and another one for alphas: https://10.0.1.2:8889/notebooks/tools/low_price_options_analysis-alphas.ipynb https://10.0.1.2:8889/notebooks/tools/low_price_options_analysis-index.ipynb

Here are results for '!NEW_AlphaV1Exposure_HedgedBy_V2_IndexEXOLongEnhance_DT_PutSpread_DSP_InstaTrendline__Bullish_Aug_7_33' image

And for index 'US.ZC_EXO_CallSpread_DynKel_shorts': image

Task the bigger task is to establish how many required options are unnecessary trades. In others words how often are we selling (exiting) options below 2-5 ticks and then reentering these OTM options. I think we could probably reduce the commissions costs in the model by 50-70% is we correctly accounted for these low risk options .

I didn't decide how to implement this in the best way, so far. For 'US.ZC_EXO_CallSpread_DynKel_shorts' index we have about 40% of transactions less than 5 ticks, but I'm not sure that these transactions are consecutive:

 Opened at px <5 ticks                          327     15.64%
 Closed at px <5 ticks                          543     25.97%

Probably I could analyze transactions lists to get more understanding of the process. However, I would like to get your feedback first about these tasks to make sure that I'm on the right track.

nikolas-joyce commented 6 years ago

Did you see the task lower down which combines the active and the passive position management that I proposed... I think that we allow us to reduce the trade costs. Is it clear what I am requesting?

Sent from my iPhone

On Nov 7, 2017, at 9:12 PM, alexveden notifications@github.com<mailto:notifications@github.com> wrote:

Task : Calculate the Model required trade stat. We need a count of how many trades the model is requiring so we can see how many fewer we do in practice.

Done I've implemented transaction list for alpha/index position, now you can analyze it directly. And if you'd like I can create CSV export for Excel.

Task : Confirm that cost are now included in V2 hedge legs.

Confirmed According to this notebook https://10.0.1.2:8889/notebooks/tools/alpha_costs_diagnostics.ipynbhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2F10.0.1.2%3A8889%2Fnotebooks%2Ftools%2Falpha_costs_diagnostics.ipynb&data=02%7C01%7Cnikolasjoyce%40hotmail.com%7C8ec9bc403d5641cc0a2608d526674073%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636457147255054066&sdata=shfilZkFynMBj22JVnLcISQ8KY%2FZJVVqVUoWcH99k2U%3D&reserved=0 alphas still have no costs settings in contexts but all of them use default settings (3.0 per contract / option)

Task: Constuct a notebook that lets the user view the number of options exited below some defined tick level. say the total trade count over a window is 2000 trades and 600 are exits of options below 3 ticks we can conclude the true trade count is closer to 1400...

I have created 2 versions, one for indexes and another one for alphas: https://10.0.1.2:8889/notebooks/tools/low_price_options_analysis-alphas.ipynbhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2F10.0.1.2%3A8889%2Fnotebooks%2Ftools%2Flow_price_options_analysis-alphas.ipynb&data=02%7C01%7Cnikolasjoyce%40hotmail.com%7C8ec9bc403d5641cc0a2608d526674073%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636457147255054066&sdata=UPqUFZSVTXsgsElfrWUhO%2FQT2QBNhxj3wo0Q5S0WliQ%3D&reserved=0 https://10.0.1.2:8889/notebooks/tools/low_price_options_analysis-index.ipynbhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2F10.0.1.2%3A8889%2Fnotebooks%2Ftools%2Flow_price_options_analysis-index.ipynb&data=02%7C01%7Cnikolasjoyce%40hotmail.com%7C8ec9bc403d5641cc0a2608d526674073%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636457147255054066&sdata=rA5G%2FR0vvduKyfQx0JuwLREb7NI7TeUFy7kZaNCj0ho%3D&reserved=0

Here are results for '!NEW_AlphaV1Exposure_HedgedBy_V2_IndexEXOLongEnhance_DT_PutSpread_DSP_InstaTrendline__Bullish_Aug_7_33' [image]https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F18488560%2F32532437-ae40b75c-c463-11e7-963a-cf72bfb3291b.png&data=02%7C01%7Cnikolasjoyce%40hotmail.com%7C8ec9bc403d5641cc0a2608d526674073%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636457147255054066&sdata=LG7%2BoknEEDSRrMR7j3TUdeqeA6chrkIpF1goOJvaBpk%3D&reserved=0

And for index 'US.ZC_EXO_CallSpread_DynKel_shorts': [image]https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F18488560%2F32532444-c665e4ce-c463-11e7-8dc4-cc1a147db1be.png&data=02%7C01%7Cnikolasjoyce%40hotmail.com%7C8ec9bc403d5641cc0a2608d526674073%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636457147255054066&sdata=X4jSG%2BFK7Jrp3ySGpkr70HVYfVeyA2T7g8VPO0euYpo%3D&reserved=0

Task the bigger task is to establish how many required options are unnecessary trades. In others words how often are we selling (exiting) options below 2-5 ticks and then reentering these OTM options. I think we could probably reduce the commissions costs in the model by 50-70% is we correctly accounted for these low risk options .

I didn't decide how to implement this in the best way, so far. For 'US.ZC_EXO_CallSpread_DynKel_shorts' index we have about 40% of transactions less than 5 ticks, but I'm not sure that these transactions are consecutive:

Opened at px <5 ticks 327 15.64% Closed at px <5 ticks 543 25.97%

Probably I could analyze transactions lists to get more understanding of the process. However, I would like to get your feedback first about this tasks to make sure that I'm on the right track.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftrendmanagement%2FTmqr-framework-2%2Fissues%2F83%23issuecomment-342712786&data=02%7C01%7Cnikolasjoyce%40hotmail.com%7C8ec9bc403d5641cc0a2608d526674073%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636457147255054066&sdata=ahi73Qod23pdiXqGqcwyFoHAUDdXrTQ1qwlLQuRMBn8%3D&reserved=0, or mute the threadhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FARobLDljNXOCrWx_9JNqfqNWsAVphMvfks5s0TgjgaJpZM4QVUh8&data=02%7C01%7Cnikolasjoyce%40hotmail.com%7C8ec9bc403d5641cc0a2608d526674073%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636457147255054066&sdata=aLcqeuJjHgN0jb%2FnuiQYiISojpaGALxIFfhTn7K%2Fwv4%3D&reserved=0.

alexveden commented 6 years ago

unfortunately I didn't completely understand this task

Отправлено из Mail.Ru для Android среда, 08 ноября 2017г., 09:30 +04:00 от NikolasJoyce notifications@github.com :

Did you see the task lower down which combines the active and the passive position management that I proposed... I think that we allow us to reduce the trade costs. Is it clear what I am requesting?

Sent from my iPhone

On Nov 7, 2017, at 9:12 PM, alexveden <notifications@github.com<mailto: notifications@github.com >> wrote:

Task : Calculate the Model required trade stat. We need a count of how many trades the model is requiring so we can see how many fewer we do in practice.

Done I've implemented transaction list for alpha/index position, now you can analyze it directly. And if you'd like I can create CSV export for Excel.

Task : Confirm that cost are now included in V2 hedge legs.

Confirmed According to this notebook https://10.0.1.2:8889/notebooks/tools/alpha_costs_diagnostics.ipynb < https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2F10.0.1.2%3A8889%2Fnotebooks%2Ftools%2Falpha_costs_diagnostics.ipynb&data=02%7C01%7Cnikolasjoyce%40hotmail.com%7C8ec9bc403d5641cc0a2608d526674073%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636457147255054066&sdata=shfilZkFynMBj22JVnLcISQ8KY%2FZJVVqVUoWcH99k2U%3D&reserved=0 > alphas still have no costs settings in contexts but all of them use default settings (3.0 per contract / option)

Task: Constuct a notebook that lets the user view the number of options exited below some defined tick level. say the total trade count over a window is 2000 trades and 600 are exits of options below 3 ticks we can conclude the true trade count is closer to 1400...

I have created 2 versions, one for indexes and another one for alphas: https://10.0.1.2:8889/notebooks/tools/low_price_options_analysis-alphas.ipynb < https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2F10.0.1.2%3A8889%2Fnotebooks%2Ftools%2Flow_price_options_analysis-alphas.ipynb&data=02%7C01%7Cnikolasjoyce%40hotmail.com%7C8ec9bc403d5641cc0a2608d526674073%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636457147255054066&sdata=UPqUFZSVTXsgsElfrWUhO%2FQT2QBNhxj3wo0Q5S0WliQ%3D&reserved=0 > https://10.0.1.2:8889/notebooks/tools/low_price_options_analysis-index.ipynb < https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2F10.0.1.2%3A8889%2Fnotebooks%2Ftools%2Flow_price_options_analysis-index.ipynb&data=02%7C01%7Cnikolasjoyce%40hotmail.com%7C8ec9bc403d5641cc0a2608d526674073%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636457147255054066&sdata=rA5G%2FR0vvduKyfQx0JuwLREb7NI7TeUFy7kZaNCj0ho%3D&reserved=0 >

Here are results for '!NEW_AlphaV1Exposure_HedgedBy_V2_IndexEXOLongEnhance_DT_PutSpread_DSP_InstaTrendline__Bullish_Aug_7_33' [image]< https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F18488560%2F32532437-ae40b75c-c463-11e7-963a-cf72bfb3291b.png&data=02%7C01%7Cnikolasjoyce%40hotmail.com%7C8ec9bc403d5641cc0a2608d526674073%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636457147255054066&sdata=LG7%2BoknEEDSRrMR7j3TUdeqeA6chrkIpF1goOJvaBpk%3D&reserved=0 >

And for index 'US.ZC_EXO_CallSpread_DynKel_shorts': [image]< https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F18488560%2F32532444-c665e4ce-c463-11e7-8dc4-cc1a147db1be.png&data=02%7C01%7Cnikolasjoyce%40hotmail.com%7C8ec9bc403d5641cc0a2608d526674073%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636457147255054066&sdata=X4jSG%2BFK7Jrp3ySGpkr70HVYfVeyA2T7g8VPO0euYpo%3D&reserved=0 >

Task the bigger task is to establish how many required options are unnecessary trades. In others words how often are we selling (exiting) options below 2-5 ticks and then reentering these OTM options. I think we could probably reduce the commissions costs in the model by 50-70% is we correctly accounted for these low risk options .

I didn't decide how to implement this in the best way, so far. For 'US.ZC_EXO_CallSpread_DynKel_shorts' index we have about 40% of transactions less than 5 ticks, but I'm not sure that these transactions are consecutive:

Opened at px <5 ticks 327 15.64% Closed at px <5 ticks 543 25.97%

Probably I could analyze transactions lists to get more understanding of the process. However, I would like to get your feedback first about this tasks to make sure that I'm on the right track.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub< https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftrendmanagement%2FTmqr-framework-2%2Fissues%2F83%23issuecomment-342712786&data=02%7C01%7Cnikolasjoyce%40hotmail.com%7C8ec9bc403d5641cc0a2608d526674073%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636457147255054066&sdata=ahi73Qod23pdiXqGqcwyFoHAUDdXrTQ1qwlLQuRMBn8%3D&reserved=0 >, or mute the thread< https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FARobLDljNXOCrWx_9JNqfqNWsAVphMvfks5s0TgjgaJpZM4QVUh8&data=02%7C01%7Cnikolasjoyce%40hotmail.com%7C8ec9bc403d5641cc0a2608d526674073%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636457147255054066&sdata=aLcqeuJjHgN0jb%2FnuiQYiISojpaGALxIFfhTn7K%2Fwv4%3D&reserved=0 >. — You are receiving this because you were assigned. Reply to this email directly, view it on GitHub , or mute the thread .