Showing posts with label FGBL. Show all posts
Showing posts with label FGBL. Show all posts

Thursday, 20 September 2018

FGBM vs FGBL


Introduction

I love macroeconomics, this is why I have some preference for the interest rate derivatives. If we check the main European fixed income futures, we need to have a look at the Eurex exchange. One of my favourites futures is the FGBL (bund future). However, it’s difficult to trade for individuals with small accounts because it’s easy to get stopped out. If the 10-year bund future is to volatile for you, I would recommend having a look at the FGBM (5-year bond future known as bobl) It has the same tick value as the FGBL and it´s less volatile. And if you are starting, I would definitely go for the FGBS (2 German bond future called Schatz).


Can we trade these products only looking at the macroeconomic indicators?

Well, I believe that you can, it depends on the size of your account, the trade size, the strategy (risk management, money management) …

If you have a big balance, you can trade according to the macroeconomic data as far as you trade a small size and you look for the medium term or long term. The problem here is that you need to create your own indicator that shows you the health of the economy. In the current environment, I find this challenging because some assets are influenced by the central banks' decisions and political uncertainty (it’s very difficult to measure these factors and include them in a model). I highly recommend to set up a stop if you are going to trade like this.

FXandFixedIncomeTrading logo
    FXandFixedIncomeTrading logo, own elaboration

What are the alternatives of trading trends?

If you don’t like to trade trends you should be looking for market neutral strategies.  This kind of strategies are used by hedge funds. It basically consists of hedging. It seeks to avoid the market risk. The way to apply this strategy with futures is with intra-product spreads or inter-product spreads.


FGBM-FGBL Spread

I’ve been looking for a trading strategy like this for a while. I decided to spread the FGBM and the FGBL at the ratio of 3 to 1. I have checked only the charts but they look good to me.

FGBM-FGBL Dec18, daily
     FGBM-FGBL Dec18, daily, source: TradingView

As you can see it has been moving in range since the middle of June. The range of the spread has been 160 ticks (234.60 and 233) while the bund range has been 291 ticks. I wouldn’t recommend holding overnight positions because these futures can open with a gap.


Conclusion

Sometimes is worth to consider market neutral strategies. Their main advantages are: there are multiple of entries, they are less risky than the outrights, you can consider as an alternative strategy if there is a lot of uncertainty in the market.  Obviously, the ratio 3 to 1 used in the example is random. I could have chosen a different one. Ideally, we should compare the DV01 of these futures and get the ratio from there. On the other hand, you can consider the different volatilities of the products involved or the correlation to get the spread ratio. Also, you should think about the trading commisions and the margins because it’s not the same to trade a 1 to 1 spread than 100 to 200. Having in mind all of these factors is not easy and requires a lot of work. Sadly, after testing the system or the strategy you can be disappointed with the results. Don´t give up and keep trying to improve it.

Have a good trading!!





Disclaimer


I wrote this article myself, and it expresses my own opinions that shouldn't be used as a trading advice. Trading carries considerable risk due to the high leverage involved

Sunday, 3 June 2018

Italy, new political uncertainty


This is a brief article about the positions we can take if one country has political problems or its economy is weakening versus other countries or economic areas.

Italy


The president denied a group that was elected because he thought that having a eurosceptic finance minister wouldn´t be right for Italy. This generated a big sell-off on the Italian bonds due to the political uncertainty. After two days Giuseppe Conte was presented as a prime minister. There are a lot of doubts about the future because the new government rejects austerity. In addition, one of the measures is reducing the tax to 15-20% for individuals and corporates. Probably this is good in order to expand the economy or promote new investments. On the other side, this will generate larger déficit. 

    FBTP Jun18,  daily, Source: TradingView

The volatility has increased in the last five days. The FBTP Jun18 was in free falling the last Monday and Tuesday. After that, it has recovered.

FGBL-FBTP Spread

     FGBL vs FBTP Jun18, daily, Source: TradingView

The spread vs the Bund and the FBTP has increased dramatically. In the best scenario, a trader would have bought the FGBL Jun18 and would have sold the FBTP Jun18 at the beginning of the week or even when it broke the 26 level. The reason behind this is covering and hedging in some way because the bund is more stable So basically, we are reducing volatility. The Italian Bonds yield’s jumped due to the political uncertainty and the possibility of breaking the relationships with Europe.

Sum up

We have seen how volatile the markets can be in these situations. One of the best ideas is spreading versus a safer bond as I showed above. In my opinion, Italy won’t leave Europe. I will talk about Spain in the following post. Thanks.

Have a good trading!!!




Thursday, 9 November 2017

Why should we use R to backtest some strategies? Quantitative approach

We live in a technological era. Basically, we can have whatever we imagine. Walt Disney said once: “If you can dream it, you can do it”. What happens if we put together the technology and the investment world?


Algo Functionality or develop from scratch with a programming language


I know that there are a lot of trading platforms that offer their own easy language or built-in algo functionality, sadly, in my opinion, is not flexible. Let me explain in a better way, you can do a lot of things but mostly it’s focused on Technical Analysis.
Using programming languages allows you to apply whatever you have in mind as far as you can code it. However, it´s more difficult and learning takes time. There are a lot of books and online courses.  
I started with R a couple of years ago. It’s an open source programming language and software environment focused on statistics. I think is one of the easiest and it has similarities with Excel. There are a lot of specific packages that contain different functions and studies. It’s a powerful tool to backest some strategies.

     R Studio screenshot, own elaboration

Create your own systems


Let me sum up some of the advantages and disadvantages of developing a trading system in R.

Advantages

  • You can analyze and backtest large datasets
  • The statistical insights you get from the data can help you to build new systems.
  • It’s more flexible, you can base your decisions purely on the data or even support with some technical analysis.
  • You can optimize the different variables and see how it affects to the system
  • Once the system is live, the risk management won´t be discretionary and you will know the maximum risk you are taking.
  • Attaching  risk management systems and money management systems provide interesting scenarios to consider


Disadvantages

  • Takes time to learning about programming
  • I would recommend to have a good knowledge of trading or investing
  • You will find out that the most part of your ideas are not profitable
  • Programming some of the trading ideas is challenging
  • Linking with the Brokerage API can be difficult


Successful Hedge Funds and Market Makers

There are a lot of Hedge Funds that are known for their specialization on systematic trading using only quantitative models.  Renaissance  Technologies is well known in the sector and they started this way of trading a long time ago. In the recent years, more hedge funds are following these methods and some of the reasons are above. Developing and applying these systems are the hardest part.  Can we emulate this activity in our home? Well, in my humble opinion, we can try. First, we should now that our possibilities are reduced in comparison to a hedge fund or investment bank. These companies employ big teams of people, they can afford to invest money in the latest technology and they have been a long time in the business.

What is the process I follow?

First is the idea generation. Before this step, you should be familiar with the product and understand how it moves. It can be as simple as buying at 9:00 and selling after 5 minutes. You can complicate as much as you want but you should think that you need to code it later. Adding variables to the system will reduce the times that you trade and you will need a larger data sample to meet statistical significance.

Second, you need to download the data from your trading platform or data vendor. Remember to check if the data contains any error. Even if you know the product, I recommend analyzing from a statistical point of view. This can provide you better insights than the chart. The size of the sample should be big enough to meet the statistical significance

Third, code your strategy. Try to make the code as flexible as possible because you will need to optimize some variables in future tests. I would recommend focussing on the risk management and money management because they are key parts for the success of the system. Add ratios to measure the performance, the risk-reward, the biggest drawdown, the success ratio…

Four, applying the strategy to the data. If you are not happy with the ratios shown, try to optimize some variables.

The last step should be adapting your code to the brokerage API to execute the trades.

My little system


I’m not going to disclosure the strategy but it’s based on mean reversion. I chose the Euro-Bund (FGBL) for its liquidity and I believe that we can see significant moves in the near term. The system is designed to open and close positions on the same day. I do apologize for any error as the strategy is at an early stage. Let’s check how is performing from the beginning of the year.

The initial portfolio was set up as 20000 Euros.
    Statistics and ratios from the strategy, own elaboration using R Studio

Let me briefly comment these ratios. As you can see each trade generates 79.35 EUR gain on average, please consider 77 trades because the system doesn’t trade every day. The biggest gain was 910 EUR. The worst day it lost 620 EUR, which shouldn’t be right because I limited the losses to 250 EUR per day. After a while, I discover that it was due to an error in the data. The system has generated 6110 euros this year that considering the initial portfolio of 20000 euros brings a 30.55% return. The probability of a successful trade is 59.65%. The Sharpe Ratio is 2.38.




   Histogram of the closed trades, own elaboration

This is the distribution of the PnL generate by each trade. Sadly it’s concentrated around -250 euros and this is because some movements trigger the stops. 


   PnL Curve since the beginning of the year, own elaboration

I like this chart because it shows that in general terms the system is making money consistently. There are certain drawdowns that I would like to smooth if I decide to optimize some variables of the system.

Finally one of my favourites metrics, the maximum drawdown:


    Max Drawdown, own elaboration

The maximum drawdown is 2650 Euros which was the equivalent to around 10% of the portfolio at that time. It happened between the trades 51 and 62.
I think that the metrics are good, but discussing the performance is not the purpose of this post. You should focus on the process and how to get the advantage of that. Don’t think that every mean reversion system is profitable, I’m sure that if I change the risk parameters and I run the backtest again the system can show loses.

Conclusion


I hope you like it. If you like trading and coding, I recommend following this kind of approach at least for a second opinion. Some of the biggest hedge funds are investing in this kind of technology and they are trying to create systems that emulate the most experienced and successful traders. Thanks.

Have a good trading!




Disclaimer

I wrote this article myself, and it expresses my own opinions that shouldn't be used as a trading advice. Trading carries considerable risk due to the high leverage involved


#trading #quantitativeanalysis  #tradingstrategies #tradingsystems #Rstudio #riskmetrics #performance #FGBL


Thursday, 5 October 2017

FGBL Dec17

In my opinion, the first thing, even if it’s not important for day trading, is to get an idea about the fundamentals and the economic outlook. Europe has been outperforming related to other economic areas. The beginning of the Eurozone recovery was driven by the exports, taking advantage of a cheap Euro. In addition, the industrial production and the consumer index show better figures. The BCE has been criticized because takes a lot of time to decide and implement changes in the economic policy. I like to say that Europe moves slowly but with certainty. Draghi has been hawkish supporting the improvements of the economy in the last meetings.  The next step, like in the US, is to stop buying government bonds and different assets to support the economy. It’s difficult to say when it will happen, I’d like to think about the final of the first quarter 2018. The weakest part is the inflation that is not as high as the BCE would like it.
    Source: TradingView, FESX EuroStoxx vs EURUSD


FGBL

    Source: TradingView, FGBL Euro-Bund Dec17

As you can see this contract didn´t have enough liquidity until September when the other contract expired. I’m going to analyze from September to October.


    Source: TradingView, FGBL Technical Analysis

As you can see there are 2 clear resistances (161.32 and 161.93) and two supports (160.85 and 160.57) I’m bearish on this contract. It’s trading in a congestion zone, so I expect a large movement as soon as it breaks the 161.93 resistance or the 160.57 support. I´ve highlighted in yellow some of the most significant shadows. The numbers, 1 to 3, shows the strength of the buyers in the area between 161 and 160.20. In the number 4, yesterday, the market rejected the prices and bounced back to the first resistance at 161.32. Today, it went up twice but the upside movements have been rejected and at the moment is around 161.30.

To sum up. I have a positive outlook of the Eurozone and technically I can see a bearish trend. The risks are: a turnaround of the world economy (considering the correlation in the markets), how the Brexit will affect the Eurozone, the independence movements of the countries in Europe. If you do day trading you shouldn't worry about these things but it's good to have in mind. 

Have a good trading.



Disclaimer

I wrote this article myself, and it expresses my own opinions that shouldn't be used as a trading advice. Trading carries considerable risk due to the high leverages involved

8th day small profit that helps me to keep going in the competition

After a successful week and most importantly from recovering almost $6k, I wanted to consolidate my positive results. My desire was to b...