Showing posts with label hedge funds. Show all posts
Showing posts with label hedge funds. 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

Monday, 27 August 2018

How to get 1 Million Dollars (or Euros, or British Pounds…)


Introduction

The other day, I had a really interesting conversation with one of my friends. It was the kind of thought that we can have on Sundays. We were wondering how to get one million dollars (or Euros, British Pounds, it's applicable to all currencies)

Discussion

In the beginning, we were saying silly things that come from social media and it's difficult to verify if it's true or not. After that, we briefly talked about real estate. Everything looked great but the high capital required to invest in this kind of asset makes it difficult (without having already saved part of the mortgage)

We follow the main hedge funds, so we started talking about trading legends such as Jim Simons, George Soros, Warren Buffet, Ray Dalio, Steve Cohen, William Ackman and Ken Griffin (The list is really big, they are only a few of the best)


The next table shows the 3-year compound return for some hedge funds:

 Penta Top 100 Hedge Funds, Source: Barrons
                 Penta Top 100 Hedge Funds, Source: Barrons

You can find the whole list on the link below:

This idea was great but considering that some of the strategies used by hedge funds (and asset management, CTAs… ) require big sums of money, it was discarded automatically. In addition, we don´t know wealthy investors and we don’t have any track record.  Another solution is to invest directly in one of these entities, but again, the mínimum investment is pretty high.
At this point, we were aware of the reality but I said that we can get it! The only requirement is commitment and patience (this will be discussed later on)

The model

Before I explain this model I would like to make some assumptions:

  • I consider that the money saved every month is the same for the whole life of the individual.
  • All the savings are for investment purposes.
  • The individual can’t withdraw any money once it´s invested.
  • The return is positive for the whole life of the investment (the return is considered as an annual average return of the investment)
  • The investment is not defined
So basically there is no secret, the idea is based on saving money every month and invest it in the asset that you consider suitable for you. 



The table used for the calculation, own elaboration
       The table used for the calculation, own elaboration

As you can see the table has different columns, let me explain them. The year and the month are in order for charting purposes. The savings is the amount saved per month (in the example is 500 but I´ve done it for 300, 700 and 1000 units of currency every month) The rest of the columns represent a financial calculation to reflect the effect of investment (in that case, I’ve chosen monthly compounding (Amount saved * (1 + Annual return % ) ^ (1/12)) 


 Example of the first 5 months and the last 5 months, own elaboration
     Example of the first 5 months and the last 5 months, own elaboration

This is the same table as the previous one. I want to show the top and the bottom of the table used for the charts that I’m going to explain now. 


Total savings after 40 years without investing them, own elaboration
      Total savings after 40 years without investing them, own elaboration

These are the amount we would have after 40 years (or 480 months) without investing. Obviously, if you save more, you will be wealthier in the future.



Final amount after investing for 40 years, own elaboration
      Final amount after investing for 40 years, own elaboration

This table is really interesting because shows the capital after investing for 40 years. Here we can see why investing is very important to build wealth. Let's say that we can afford to save 300 units of currency per month. After 40 years, we check the account and we can find 2 outcomes depending on if we decided to invest or not. Without investing the savings, we would have 144000 while if we had invested at 5% per year, we would have made 446569,38. Investing generates 3 times more money than only saving (there is risk in every investment and you should check if it’s suitable with you or not) Returning 10% or more per year is not impossible but doing consistently is very difficult. However, if you get it, you will see your investments grow quickly. 



Charts about the lifetime investment for the different average returns and savings levels, own elaboration

  Charts about the lifetime investment for the different average returns and savings levels, own elaboration

Here we can see the effect of compound interest over time. As Albert Einstein said once: “the power of compound interest the most powerful force in the universe”

Now coming back to the title of this post, let’s find out how many months of savings we need to reach 1 million:


Months needed to reach 1000000, own elaboration
      Months needed to reach 1000000, own elaboration

Sadly for the lower saving quantities is not possible to reach this figure or a high return is needed. Sadly there is a high risk involved in strategies that return high return.  For the rest is easier but it’s not an overnight process. At this point, we need patience and keep working hard.

Why only a few percentage of people become as wealthy as in the example?

  • Investing is not as linear as I showed. There are years in which you make a profit and years in which you may lose money or even you can be breakeven.
  • Saving money sometimes depends on a personal situation (There are so many things in life more important than saving a fixed amount every month)
  • At the beginning of your professional career the salary is low and after that, it should adjust according to the experience.
  • After saving “X” amount of money, you can think of relocating to a better property, getting a car or something that won't allow you save as you have been doing until now (maybe your salary has increased enough to cover this expenditure via personal loan but it’s difficult and it doesn’t apply to everyone)
  • The example shown doesn’t apply to everyone because you need to work for the next 40 years.



Conclusion

Even if getting a million is difficult, it’s not impossible. If your personal situation allows you to save and invest every month, the only secret is Commitment and Patience. You need to understand the investments and the risk involved.

All the best!!




Sunday, 20 May 2018

Appaloosa 1st quarter changes in its portfolio

The other day  I read an interesting article on ZeroHedge (http://www.zerohedge.com/news/2018-05-18/tepper-trounces-competition-outperforms-peers-600-ytd). It was related to the portfolio changes on the Appaloosa’s portfolio. Appaloosa Asset Management is outperforming its peers, this is why I decided to investigate what they are doing differently from the rest. Reading the 13-F from the biggest hedge funds can help you understand how they take the investment decisions. However, you won't be able to know the price in which they entered or exited the positions.


I´ve only focused on the new positions:

Lam Research Corp (LRCX)

    Lam Research Corp, source: TradingView

The strong fundamentals and the high margins will help the stock to go up.


Lam Research Corp ratios, source: TradingView                               


Wells Fargo (WFC)      

    Wells Fargo, source: TradingView

This company has been punished in the markets due to the regulatory constraints. However, it showed earnings that beat expectations. I think Wells Fargo is capable to provide good returns for investors via earnings growth, dividends. The net margins are good and the P/E ratio is better than its sector peers.

UBS Group AG (UBSG)

    UBS AG Group, source: TradingView

This investment brings geographical diversification. It’s the largest global wealth manager and has a large exposure to Asia.  It offers a 4% dividend plus buybacks. It showed the best quarterly results in 3 years on the 23rd April. The lower revenues and rising cost are one of the main concerns. I think investing long term in this company is not a bad idea. However, I would prefer to buy under 15CHF.

Applied Materials (AMAT)

    Applied Materials, source: TradingView

The strong fundamentals are driving the price of this stock higher. The sound financial situation allows the company to increase the investments. The biggest concern at the moment is that the makers of displays and chips to store data in high-end phones are slowing some projects. (The best example is the disappointing sales from the iPhone X)

SMH semiconductor ETF (SMH)

    SMH semiconductor ETF, source: TradingView

This chart shows the incredible performance of this semiconductor ETF. I would like to remind you that I am not an expert on this sector. I can understand the growth from 2013 until now, basically, it has been driven by a strong demand for this devices. When something becomes popular there is two ways of making money:

                -Mass production with the smallest cost possible
                -Limited production of high performance devices

At this point is up to the clients. Will we see strong demand in the best devices out there? (We have seen disappointing sales in some of them) Will the price of these devices decrease ? If so, the net margins will do as well and their rating will be downgraded. I’m not saying that is a bad investment, I have only expressed my point of view.

ALPS ETF

There are 16 ETFs listed under this asset management. I believe that they use for diversification purposes. 

Knight Swift (KNX)

    Knight Swift, source: TradingView

This company has great fundamentals. The financial leverage is really small. The main concern is to hire and retain truck drivers as the company said when the 1st quarter earnings were released.

Boyd Gaming (BYD)

    Boyd Gaming, source: TradingView

It has good fundamentals for a short-term investment. The resistance is around 40 so it doesn’t have a lot of upside potential (in the short-term). The analysts think that this kind of business has one of the lowest growth prospects.

Platform Speciality Prods Cor (PAH)

    Platform Speciality Prods Corp, source: TradingView

It has an attractive P/E ratio and upside potential. I believe that Appaloosa bought under 10. One of the biggest problems is the financial situation.

United Contl Hldgs Inc (UAL)

    United Continental Holdings, source: TradingView

The enterprise value to sales under 0.80 and the P/E under 10 make it attractive for investors.

Nvidia (NVDA)

    Nvidia, source: TradingView

Nvidia is a successful company that its share price can continue to rise in the following year. The sales growth forecast is positive for the next years and if we consider that the margins are high, we will see this stock higher.

Sum Up

Today’s article has been different from the other ones. I haven’t analyzed all the stocks properly but I’ve given a quick overview. In the case of the stocks above, they have good fundamentals and some of them are down around 20% from the last max. If the market continues rising, Appaloosa will deliver a strong performance.

As I said, we can learn a lot with the 13 F even if we don’t know the prices in which the trades were executed.  Obviously, we should do our own research but we can compare if some of the biggest funds are taking the same positions. Another thing to consider, that I haven´t mentioned, is the type of investor, maybe they are looking for a short-term investment while you can be considering a longer time frame.

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

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


Sunday, 8 October 2017

Quantitative Strategy FGBL Futures

Some time ago, I was checking some charts when I decided to create an algorithm. The product chosen was the FGBL, the Euro-Bund futures. Basically, I thought that was a relationship between the past and the future. It sounds familiar, doesn't it? I found the historical and I started working on it.
First I run the strategy without any stop or money management strategy but I was disappointed with the results. Sadly I don't have any screenshot of that.
Second, I decided to apply risk management and limit the amount I could lose.
This improved a lot the strategy but I wasn't happy at all. Using my background, reading, and learning, I started applying money management. It had a better risk-reward, but it was riskier. I backtested this system from the 04/01/2016 to the 30/12/2016.
These are a couple of tables that explain some ratios: 

Initial Portfolio
50000 euros
Final Portfolio
77140 euros
Annual Return
54,28%
Positive days
457
Negative days
548
Positive trades (% of the total)
44,46%
Negative trades (% of the total)
53,31%
Mathematical Expectancy
9,1299
Positive days average
192,36 euros
Negative days average
-143,99euros
Max Drawdown
28,55%












Portfolio value
Lots
Max risk per trade
40000 euros
3
1.5%
60000 euros
4
1.33%
80000 euros
5
1.25%
Please have in mind that I haven't included the cost of trading (execution costs, market data, trading platform) I believe that the execution cost would be around 12-13k, so the profit would be half of the figure shown above. It's riskier than a normal hedge fund because they normally have less than 20% drawdown. The asymmetric leverage is really important. I've never traded with this system and I can adjust the risk management and the money management to meet certain goals. I should have backtested at least 5 years and then do the out of sample to check that it behaves like the backtested sample. This is only an example of how to design a trading system. 

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...