Discussing the article: "Reimagining Classic Strategies in MQL5 (Part II): FTSE100 and UK Gilts"

 

Check out the new article: Reimagining Classic Strategies in MQL5 (Part II): FTSE100 and UK Gilts.

In this series of articles, we explore popular trading strategies and try to improve them using AI. In today's article, we revisit the classical trading strategy built on the relationship between the stock market and the bond market.

All Governments in the developed world issue liabilities denominated in their domestic currency, and the UK government is no exception. The gilt is a UK government debt instrument, and it is also listed on the LSE. Gilts are fixed income securities that are available in 2 different types. The first type is the conventional guilt, and it constitutes the majority of guilt sales. This conventional guilt pays out a fixed coupon to the bearer of the guilt until maturity, upon maturity the final coupon and principal are paid back to the investor.

Since their inception, the UK government has not defaulted on a single coupon or principal payment owed to guilt holders. By purchasing a guilt, the bearer is essentially lending money to the UK government. Investing in bonds offers material advantages to the savvy investor, including predictable income and low default risks, just to name a few. It is often said by bond investment professionals "Return of capital is more important than return on capital", return on capital is a common metric used to judge how profitable an investment was, the saying implies that simply getting your money back is worth more than earning a profit with the risk of losing your principal.


The second type of guilt is the index-linked guilt. This particular guilt does not have a fixed coupon rate, rather the payouts received from the bond are allowed to float, to compensate the investor for the total inflation accrued whilst holding on to the guilt. These index-linked guilts are not as popular as the fixed guilts due to their unpredictable cash flow streams.

Author: Gamuchirai Zororo Ndawana

 
Good explanation of each section of code.
I think there is an error in your forecast calculation where the guilt_data is being re-added in the 7th 8th and 9th data instead of uk100 data.
If this was intentional, what is your reasoning being this?

Good article anyway.  Cheers. 
 
Omnitek #:
Good explanation of each section of code.
I think there is an error in your forecast calculation where the guilt_data is being re-added in the 7th 8th and 9th data instead of uk100 data.
If this was intentional, what is your reasoning being this?

Good article anyway.  Cheers. 
Hi, thank you for your feedback. 

That sounds like a major bug in the code worth revision, it was not intentional. Thank you for raising it 

Upon revision I now see the error, I clearly called for the guilts data twice instead of fetching the the UK100 data, fortunately it's human error not a bug in the MQL5 language.