SBatch 3,123 Report post Posted December 27, 2023 There is a definitive correlation between crude oil prices and the 10 year Treasury yield, led slightly by crude. That's the edge. The option trades around this are endless. It makes sense, higher crude price, higher inflation, higher yields. 1 year chart: Sure looks like the 10 year yield is about to move higher very soon. 5 year chart: Absolutely remarkable. Directional trades can be huge winners here. Crude leads the 10 year yield (therefore their prices are inversely correlated). 3 Share this post Link to post Share on other sites
SBatch 3,123 Report post Posted January 5 And there's the bounce: 2 Share this post Link to post Share on other sites
SBatch 3,123 Report post Posted January 5 On 1/5/2024 at 2:32 PM, Sunshine25 said: How do you personally play this trade? If the trade is highly correlated, and led slightly by crude, do you take a position in a financial instument (TLT?) to play the trade? Short Call against crude and long call on tlt? I am just spit-balling trades. I just use a put or call directional debit spread (or theta positive neutral spread) on TLT/TMF after I see the move in oil but before rates start to follow. I recommended this one in October, just about 100% return. Basic idea, higher crude, lower TLT and vice versa. https://steadyoptions.com/forums/forum/topic/9288-bond-market-implosion/?do=findComment&comment=187802 Share this post Link to post Share on other sites
SBatch 3,123 Report post Posted January 11 Getting interesting. This hot inflation report could fuel follow-through upward momentum on oil. It is certainly set up from a technical perspective, and now it has the fundamental. With a break of $76 on crude I would go short on TLT with a near or in the money debit put spread. Share this post Link to post Share on other sites
SBatch 3,123 Report post Posted January 12 The setup is good for more of a sideways play. I think the 10 year will move to around 3.9% before pushing back toward 4%, tracing the same pattern as oil. This would have TLT slightly lower over the next several weeks. I opened the trade below: 01/12/2024 10:34:19 01/12/2024 10:34:19 Buy Open Sell Open 20 20 TLT 03/15/2024 102.00 Put TLT 03/15/2024 98.00 Put Net Debit 2.79 DAY Bought @ 5.55 Sold @ 2.76 Share this post Link to post Share on other sites
SBatch 3,123 Report post Posted January 12 I hedged with far OTM calls on TMF in the event of a shock that has interest rates diving. This is only necessary when using the put spreads, but not when we are bullish using the call spread. 01/12/2024 11:11:45 Buy Open 5 TMF 03/01/2024 75.00 Call Limit 0.50 DAY Bought @ 0.50 Share this post Link to post Share on other sites
Chuck451 311 Report post Posted January 12 @SBatch What is your exit strategy for this trade? Curious spectator here... Share this post Link to post Share on other sites
SBatch 3,123 Report post Posted January 12 20 minutes ago, Chuck451 said: @SBatch What is your exit strategy for this trade? Curious spectator here... It will depend on the price action, but looking for around 30% gain. The above is just the DPS, not including the TMF calls. Worst case, we give back about $200 on those, but that would have us at around 40%, still hitting 30% net. 1 Share this post Link to post Share on other sites
SBatch 3,123 Report post Posted January 12 To more fairly represent TLT, we will watch the 30 year Treasury. Pretty much lock step with the 10 year. Crude: Share this post Link to post Share on other sites
SBatch 3,123 Report post Posted January 12 Crude: 30 Year: Looks to me that we'll get a sideways chop between 4.1% and 4.30% in the near future. If so, we should be able to exit with the move to 4.25-4.3%. 1 Share this post Link to post Share on other sites
SBatch 3,123 Report post Posted January 16 I just closed the spread for 3.15 and the calls for .30. A quick 12% gain, I am goin to re-enter using a call spread shortly. 1 1 Share this post Link to post Share on other sites
SBatch 3,123 Report post Posted January 16 I opened the below Iron Condor: 01/16/2024 11:35:55 01/16/2024 11:35:55 01/16/2024 11:35:55 01/16/2024 11:35:55 Buy Open Sell Open Sell Open Buy Open 20 20 20 20 TLT 03/15/2024 90.00 Put TLT 03/15/2024 92.00 Put TLT 03/15/2024 100.00 Call TLT 03/15/2024 102.00 Call Net Credit 0.67 DAY Bought @ 0.49 Sold @ 0.86 Sold @ 0.75 Bought @ 0.45 2 Share this post Link to post Share on other sites
SBatch 3,123 Report post Posted January 16 The 30 year Treasury yield usually follows the trend of crude oil with a lag of about three weeks. That has us around Christmas where crude made its most recent peak. I believe we are at or near that peak now on the 30 year treasury. Therefore we can expect the yield to drop slightly and then move sideways for a couple weeks. This would have TLT slightly higher and then sideways; perfect for the Iron Condor. 2 Share this post Link to post Share on other sites
Kim 7,958 Report post Posted January 17 We are pleased to inform our members that this trade will become part of our official model portfolio. 1 2 Share this post Link to post Share on other sites
SBatch 3,123 Report post Posted January 18 If anyone is following the unofficial Iron Condor, I bought back the call spread for .20. 01/18/2024 13:13:30 01/18/2024 13:13:30 Sell Close Buy Close 20 20 TLT 03/15/2024 102.00 Call TLT 03/15/2024 100.00 Call Net Debit 0.20 DAY Sold @ 0.28 Bought @ 0.48 4 1 Share this post Link to post Share on other sites
JerryJet7 27 Report post Posted January 18 Following - thanks. What is the plan for the put spread as of now? Share this post Link to post Share on other sites
SBatch 3,123 Report post Posted January 18 4 hours ago, jerryjet7 said: Following - thanks. What is the plan for the put spread as of now? Holding as is. 1 Share this post Link to post Share on other sites
SBatch 3,123 Report post Posted January 30 Please follow the official thread on the active trade from this point forward: https://steadyoptions.com/forums/forum/topic/9497-discussion-tlt-march-2024-iron-condor/?tab=comments#comment-190467 Share this post Link to post Share on other sites
Romuald 626 Report post Posted March 23 (edited) I read the references you mention. I was wondering about correlation between Crude Oil and 30Y Treasury Yield, and so about the correlation between TLT and the Future CL1. For a technical reason I was not able to download past data of CL1 so I used WTI (which has the same OHLC diagram). Here are the plots of both since 2010 : Then I compute a coefficient of correlation between both and I got -0.51, the sign "minus" meaning "anti-correlation" (one up, the other down and opposite), like in this example where anti-correlation is perfect (coeff. corr = -1): This coefficient of -0.51 means that the correlation is there but not strong (max correlation is "1" or "-1"). May be is it because we have to look as TLT as a "trailer" and that a "shift in time" should be analyzed for every trade. I don't know, I am just exploring, questioning and wondering if the correlation is really so strong. Just to be curious and understand. Comments welcome! Edited March 23 by Romuald Share this post Link to post Share on other sites
SBatch 3,123 Report post Posted March 23 1 hour ago, Romuald said: I read the references you mention. I was wondering about correlation between Crude Oil and 30Y Treasury Yield, and so about the correlation between TLT and the Future CL1. For a technical reason I was not able to download past data of CL1 so I used WTI (which has the same OHLC diagram). Here are the plots of both since 2010 : Then I compute a coefficient of correlation between both and I got -0.51, the sign "minus" meaning "anti-correlation" (one up, the other down and opposite), like in this example where anti-correlation is perfect (coeff. corr = -1): This coefficient of -0.51 means that the correlation is there but not strong. May be is it because we have to look as Crude Oil as a "trailer" and that a "shift in time" should be analyzed for every trade. I don't know, I am just exploring, questioning and wondering if the correlation is really so strong. Just to be curious and understand. Comments welcome! Treasuries are the trailer, not crude. And yes, the time delay is necessary to determine the correlation. Share this post Link to post Share on other sites
Romuald 626 Report post Posted March 23 53 minutes ago, SBatch said: Treasuries are the trailer, not crude. And yes, the time delay is necessary to determine the correlation. Yes, sorry, TLT is the trailer, that is what I meant, corrected in the original. OK, so I tried with different time shifts on Crude and it did not improve the correlation. But my time shift was the same all over the 10 years and this is certainly not true. So, as I understand, time shift makes the correlation and this time shift is different from one period to the other. Quickly summarizing, Crude "shows the future way" to Treasuries but this "future" is different from one period to the other, and so is the correlation. Correct? Share this post Link to post Share on other sites
SBatch 3,123 Report post Posted March 23 20 minutes ago, Romuald said: Yes, sorry, TLT is the trailer, that is what I meant, corrected in the original. OK, so I tried with different time shifts on Crude and it did not improve the correlation. But my time shift was the same all over the 10 years and this is certainly not true. So, as I understand, time shift makes the correlation and this time shift is different from one period to the other. Quickly summarizing, Crude "shows the future way" to Treasuries but this "future" is different from one period to the other, and so is the correlation. Correct? Correct. There are fundamental issues such as inflation that can dislodge the correlation in the short term, but they always link up again at some point. Share this post Link to post Share on other sites
Romuald 626 Report post Posted March 24 So TLT follows WTI moves by some days and some issues and so WTI could be viewed like an 'indicator'. By curiosity I coded a Recurrent Neural Network (RNN) called Long Short-Term memory (LSTM) in Python. I am not a fan of such deep learning programs. A lot have been created these last years but the success in stock price prediction is weak due to the fact that stock price is a stochastic process. And randomness cannot be predicted. But, when a correlation does appear, these kinds of learning neural networks could be efficient. So why not to try with WTI and TLT since it seems that a (negative) correlation does exist. These kinds of RNN's need features to be trained on : they observe two signals and try to find a (anti-)correlation between both. Then, based on what they see, they try to make a forecast on how one of the signal (the trailer) would behave based on the model defined on past data. By the past, when I was still trying to forecast the future using neural networks I remember that I tried quasi all possible indicators (Bollinger, Ichimoku, all EMA's, etc.). None was sufficiently correlated to a given ticker to make a correct forecast. It is quickly said but just to give the idea. So, I wrote the code. This code utilizes a Long Short-Term Memory (LSTM) neural network to train a model for forecasting the TLT (Treasury Bond ETF) prices for the next nDaysForecast days based on the historical WTI (West Texas Intermediate) crude oil prices. Here's a brief overview of the steps involved: Data Downloading: Historical data for WTI and TLT for the past nYearsBack years is downloaded using the download_data function from Yahoo Finance. Data Preparation: The downloaded data is preprocessed using the prepare_data function. It scales the closing prices of the respective stocks to a range of (-1, 1) using Min-Max scaling. Sequence Creation: Sequences of input features and target variables are created using the create_sequences function. This function segments the data into input sequences (X) and corresponding target values (y). LSTM Model Definition: An LSTM model is defined using the LSTMModel class. This model consists of an LSTM layer followed by a fully connected layer (linear layer) to produce the output. Model Training: The LSTM model is trained using the historical WTI data. The training is performed for numEpochs epochs using the train_model function. Prediction: The trained model is used to make predictions for the TLT prices based on the historical WTI data. Predictions are made for the next nDaysForecast days. Uncertainty Calculation: The uncertainty in the predictions is calculated based on the root mean square error (RMSE) of the model. Plotting Results: The actual TLT prices, predicted TLT prices, WTI prices, confidence interval, and forecast range are plotted. Dashed horizontal lines are added for the max and min of the confidence interval, with their values annotated at the extreme right. So, in summary, I say to the program : look at the past data for TLT and WTI, see whether or not there is correlation (even negative) and, based upon what you see on WTI moves, build a model to try to forecast the future prices for TLT. Do it on 20 years of past data. I know that the correlation is not perfect, so compute the mean square error, based on what you observed in the past. Note that I do not say anything to my LSTM. I just ask to Here is the plot of the results : "Num Epochs" is a number of "generations". To say it quickly, the LSTM is training and learning. Each time it controls itself it improves itself by keeping only the best parameters of the model. Then it starts a new computation with the new parameters : it is the next "epoch". Here 2000 epochs have been used. Of course it must improves at each epoch, which is the case when I look at the "loss" curve (no shown here). We can see that RMSE is very low, which is a good news. I never got a RMSE so small using classic indicators by the past. I plotted the results in a dashed dark blue line and the confidence interval (based on RMSE) in results. What the LSTM says here is that, during the next 20 days, TLT would be supposed to go between $91.48 and $97.15, based on the correlation the program observed over the last 20 years between TLT and WTI. I am not saying that it is true. It is just a research, an exploration, a reflexion to be a base of discussion. As usual, any comments welcome! 2 3 Share this post Link to post Share on other sites
vralln 32 Report post Posted March 24 33 minutes ago, Romuald said: What the LSTM says here is that, during the next 20 days, TLT would be supposed to go between $91.48 and $97.15, based on the correlation the program observed over the last 20 years between TLT and WTI. I am not saying that it is true. It is just a research, an exploration, a reflexion to be a base of discussion. As usual, any comments welcome! I like the idea of applying ML to this strategy. Thanks for the detailed background on your process! Did you do any testing splitting up past data into a training set and a test set? And if so, what sort of accuracy have you seen for those predictions? 1 Share this post Link to post Share on other sites
SBatch 3,123 Report post Posted March 24 The above is an excellent chart of the correlation. As can be seen. The correlation is extremely strong until the pandemic, where yields needed to forge out an even lower low. However, as soon as that correction was made, the two synced right back up again. 2 Share this post Link to post Share on other sites
SBatch 3,123 Report post Posted March 24 2 hours ago, Romuald said: So TLT follows WTI moves by some days and some issues and so WTI could be viewed like an 'indicator'. By curiosity I coded a Recurrent Neural Network (RNN) called Long Short-Term memory (LSTM) in Python. I am not a fan of such deep learning programs. A lot have been created these last years but the success in stock price prediction is weak due to the fact that stock price is a stochastic process. And randomness cannot be predicted. But, when a correlation does appear, these kinds of learning neural networks could be efficient. So why not to try with WTI and TLT since it seems that a (negative) correlation does exist. These kinds of RNN's need features to be trained on : they observe two signals and try to find a (anti-)correlation between both. Then, based on what they see, they try to make a forecast on how one of the signal (the trailer) would behave based on the model defined on past data. By the past, when I was still trying to forecast the future using neural networks I remember that I tried quasi all possible indicators (Bollinger, Ichimoku, all EMA's, etc.). None was sufficiently correlated to a given ticker to make a correct forecast. It is quickly said but just to give the idea. So, I wrote the code. This code utilizes a Long Short-Term Memory (LSTM) neural network to train a model for forecasting the TLT (Treasury Bond ETF) prices for the next nDaysForecast days based on the historical WTI (West Texas Intermediate) crude oil prices. Here's a brief overview of the steps involved: Data Downloading: Historical data for WTI and TLT for the past nYearsBack years is downloaded using the download_data function from Yahoo Finance. Data Preparation: The downloaded data is preprocessed using the prepare_data function. It scales the closing prices of the respective stocks to a range of (-1, 1) using Min-Max scaling. Sequence Creation: Sequences of input features and target variables are created using the create_sequences function. This function segments the data into input sequences (X) and corresponding target values (y). LSTM Model Definition: An LSTM model is defined using the LSTMModel class. This model consists of an LSTM layer followed by a fully connected layer (linear layer) to produce the output. Model Training: The LSTM model is trained using the historical WTI data. The training is performed for numEpochs epochs using the train_model function. Prediction: The trained model is used to make predictions for the TLT prices based on the historical WTI data. Predictions are made for the next nDaysForecast days. Uncertainty Calculation: The uncertainty in the predictions is calculated based on the root mean square error (RMSE) of the model. Plotting Results: The actual TLT prices, predicted TLT prices, WTI prices, confidence interval, and forecast range are plotted. Dashed horizontal lines are added for the max and min of the confidence interval, with their values annotated at the extreme right. So, in summary, I say to the program : look at the past data for TLT and WTI, see whether or not there is correlation (even negative) and, based upon what you see on WTI moves, build a model to try to forecast the future prices for TLT. Do it on 20 years of past data. I know that the correlation is not perfect, so compute the mean square error, based on what you observed in the past. Note that I do not say anything to my LSTM. I just ask to Here is the plot of the results : "Num Epochs" is a number of "generations". To say it quickly, the LSTM is training and learning. Each time it controls itself it improves itself by keeping only the best parameters of the model. Then it starts a new computation with the new parameters : it is the next "epoch". Here 2000 epochs have been used. Of course it must improves at each epoch, which is the case when I look at the "loss" curve (no shown here). We can see that RMSE is very low, which is a good news. I never got a RMSE so small using classic indicators by the past. I plotted the results in a dashed dark blue line and the confidence interval (based on RMSE) in results. What the LSTM says here is that, during the next 20 days, TLT would be supposed to go between $91.48 and $97.15, based on the correlation the program observed over the last 20 years between TLT and WTI. I am not saying that it is true. It is just a research, an exploration, a reflexion to be a base of discussion. As usual, any comments welcome! Personally, I have TLT between 90 and 95 over the course of the next three weeks. 2 Share this post Link to post Share on other sites
Romuald 626 Report post Posted March 24 3 hours ago, vralln said: I like the idea of applying ML to this strategy. Thanks for the detailed background on your process! Did you do any testing splitting up past data into a training set and a test set? And if so, what sort of accuracy have you seen for those predictions? The typical length of training and testing data for a Long Short-Term Memory (LSTM) neural network can vary depending on several factors, including the complexity of the problem, the amount of available data, and the specific requirements of the task. However, there are some common practices and considerations. The training data length should be large enough to capture the underlying patterns and relationships in the data effectively. I use a significant portion of the available data for training, typically around 70%-80% of the total dataset. The accuracy is the RMSE and is equal to 1.4% 1 1 Share this post Link to post Share on other sites
ex3y7s 149 Report post Posted June 14 On 3/24/2024 at 1:19 PM, Romuald said: So TLT follows WTI moves by some days and some issues and so WTI could be viewed like an 'indicator'. By curiosity I coded a Recurrent Neural Network (RNN) called Long Short-Term memory (LSTM) in Python. I am not a fan of such deep learning programs. A lot have been created these last years but the success in stock price prediction is weak due to the fact that stock price is a stochastic process. And randomness cannot be predicted. But, when a correlation does appear, these kinds of learning neural networks could be efficient. So why not to try with WTI and TLT since it seems that a (negative) correlation does exist. These kinds of RNN's need features to be trained on : they observe two signals and try to find a (anti-)correlation between both. Then, based on what they see, they try to make a forecast on how one of the signal (the trailer) would behave based on the model defined on past data. By the past, when I was still trying to forecast the future using neural networks I remember that I tried quasi all possible indicators (Bollinger, Ichimoku, all EMA's, etc.). None was sufficiently correlated to a given ticker to make a correct forecast. It is quickly said but just to give the idea. So, I wrote the code. This code utilizes a Long Short-Term Memory (LSTM) neural network to train a model for forecasting the TLT (Treasury Bond ETF) prices for the next nDaysForecast days based on the historical WTI (West Texas Intermediate) crude oil prices. Here's a brief overview of the steps involved: Data Downloading: Historical data for WTI and TLT for the past nYearsBack years is downloaded using the download_data function from Yahoo Finance. Data Preparation: The downloaded data is preprocessed using the prepare_data function. It scales the closing prices of the respective stocks to a range of (-1, 1) using Min-Max scaling. Sequence Creation: Sequences of input features and target variables are created using the create_sequences function. This function segments the data into input sequences (X) and corresponding target values (y). LSTM Model Definition: An LSTM model is defined using the LSTMModel class. This model consists of an LSTM layer followed by a fully connected layer (linear layer) to produce the output. Model Training: The LSTM model is trained using the historical WTI data. The training is performed for numEpochs epochs using the train_model function. Prediction: The trained model is used to make predictions for the TLT prices based on the historical WTI data. Predictions are made for the next nDaysForecast days. Uncertainty Calculation: The uncertainty in the predictions is calculated based on the root mean square error (RMSE) of the model. Plotting Results: The actual TLT prices, predicted TLT prices, WTI prices, confidence interval, and forecast range are plotted. Dashed horizontal lines are added for the max and min of the confidence interval, with their values annotated at the extreme right. So, in summary, I say to the program : look at the past data for TLT and WTI, see whether or not there is correlation (even negative) and, based upon what you see on WTI moves, build a model to try to forecast the future prices for TLT. Do it on 20 years of past data. I know that the correlation is not perfect, so compute the mean square error, based on what you observed in the past. Note that I do not say anything to my LSTM. I just ask to Here is the plot of the results : "Num Epochs" is a number of "generations". To say it quickly, the LSTM is training and learning. Each time it controls itself it improves itself by keeping only the best parameters of the model. Then it starts a new computation with the new parameters : it is the next "epoch". Here 2000 epochs have been used. Of course it must improves at each epoch, which is the case when I look at the "loss" curve (no shown here). We can see that RMSE is very low, which is a good news. I never got a RMSE so small using classic indicators by the past. I plotted the results in a dashed dark blue line and the confidence interval (based on RMSE) in results. What the LSTM says here is that, during the next 20 days, TLT would be supposed to go between $91.48 and $97.15, based on the correlation the program observed over the last 20 years between TLT and WTI. I am not saying that it is true. It is just a research, an exploration, a reflexion to be a base of discussion. As usual, any comments welcome! This is a cool idea. Is the repo publicly available, or would you consider making it so? I'm an experienced software engineer but have only started dabbling in NN stuff lately by going through the amazing Karpathy videos. I'm sure I could learn a lot from seeing the code. Share this post Link to post Share on other sites