Tuesday 30 January 2018

FANG Stocks, tech portfolio

Everyone knows about the FANG stocks rally. But what does FANG mean? It’s a group of technology stocks, Facebook, Amazon, Netflix, and Google. If we look back to the beginning of 2015, we would regret not having invested in these stocks. Please bear in mind that it’s my first article using Python, so it can seem a little bit simple.


Stocks summary


Facebook

       Facebook stock, own elaboration with python and Quandl

Facebook is the biggest social network. It enables users to share opinions, ideas, photos, videos, and other activities online. It´s involved in the development of social media applications for people to connect through electronic devices. Its products include Facebook, Instagram, Messenger, WhatsApp, and Oculus. The revenue comes mainly from advertising.

Amazon

         Amazon stock, own elaboration with python and Quandl

It´s engaged in the provision of online retail shopping services  The efficiency of its distribution centers makes difficult to compete with Amazon. In addition, they have Amazon Web that it’s focused on the global sales of computing, storage, database, and AWS service offerings for start-ups, enterprises, government agencies, and academic institutions.

Netflix

        Netflix stock, own elaboration with python and Quandl

This company provides subscription service streaming movies and TV episodes over the Internet and sending DVDs by mail. Netflix obtains content from various studios and other content providers through fixed-fee licenses, revenue sharing agreements and direct purchases.

Google

        Google stock, own elaboration with python and Quandl

Alphabet operates as a holding company with interests in software, health care, transportation and other technologies. It operates through 2 segments: Google and Other Bets segments. The first one includes the following services: Search, Ads, Commerce, Maps, YouTube, Apps, Cloud, Android, Chrome, Google Play as well as hardware products, such as Chromecast, Chromebooks, and Nexus. The other one includes: as Access or Google Fiber, Calico, Nest, Verily, GV, Google Capital, X, and other initiatives.

Individual Stocks

At this point, I believe that you have your own preferences but let´s imagine that we are in 2015. Wouldn’t be better to create a portfolio with all of them?  Also, it´s another way to diversify our portfolio


    Log returns own elaboration using python

We can see how the individual stocks performed in the period. As you can see Netflix has been the more volatile. 


                                                                 Arithmetic Returns of the individual stocks

Google was the worst performer but it doubled in value. I would like to remind you that the Nasdaq index has returned 63% since 2015.
Before we put together all these stocks, let´s check the individual distributions:


             Log return distributions own elaboration

All of them have in common that the extreme observations are positive, which explains in part the reason of the rise in these stocks.

The Portfolio

After reviewing these companies and considering that they have different business units, we decide to create a portfolio. In order to make it simple, we can assign the same weight for each stock, in this case 25% of the initial capital. 

     Portfolio statistics and log returns distribution own elaboration

Considering the long run and this portfolio´ strategy (buy and hold), it´s easy to think that the majority of the daily returns are bigger than zero. This is confirmed by the chart above.
Is it safe to build a portfolio like we have done?  No, some of the reasons are that it´s not properly diversified and the correlation between the assets is positive. Luckily the companies have diversified some of their activities and they are heavily investing in technology which will bring revenue in the future. 
The portfolio return has been 104%.

                                                            Portfolio return own elaboration

Now it's the time to check the risk:

    Portfolio drawdown history, own elaboration

One of my favourites risk metrics is the drawdown. I created this chart showing the portfolio drawdown over the time. The maximum drawdown was 14.10%. This figure surprised me but the main concern is that the stock market raised on a daily basis

Sum up

I hope you like it. We have seen how the main tech portfolio has behaved since 2015. I wouldn’t invest in this kind of portfolio for the reasons mentioned above. In addition, I think that the index rally has been supported by an accommodative monetary policy. Using Python and Quandl has been great and I hope to bring more content in the future. 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

#Alphabet #Amazon #drawdown #Facebook #FANG #Google #investing #maxdrawdown #Netflix #portfolio #python #quandl #stocks #Trading

Sunday 21 January 2018

Canadian interest rate decision, the falling USD and the indexes rally


We had a busy week in terms of news and economic releases. The UK CPI and the European CPI were in line with the expectations. The Bank of Canada raised the interest rates. We saw a better than expected building permits in the US. Maybe the biggest surprise on Friday was the UK Retail Sales that show the third-worst figure in the last 5 years. On the other hand, the speculation of the government shut down drove the USD down. Sadly, now it’s official, as it happened yesterday night.


Interest Rate decision

    Source: TradingView, USD/CAD (FXCM), 15 min

As you can image, the CAD went up with the interest rate decision. The market participants expected a hawkish statement considering that the Canadian economic outlook is expected to keep strong and allow to raise the interest rates in the future. Sadly, the BOC showed its dovish side confirming that some monetary accommodation will be needed.


     Source: TradingView, USD/CAD (FXCM), daily

We can see that the USD recovered in the last 2 trading days after the dovish comments of the Bank of Canada and the uncertainty about NAFTA.


US Dollar Index


    Source: TradingView, US Dollar Index, daily

The USD has been falling during the last 3 months while the bond yields have been raising. If we only consider the FED policy, the dollar should be going up. On the other hand, and in my humble opinion, some policies are not coordinated to meet certain economic targets. In addition, some political issues such as the government shut down are reflected on the USD.

Unstoppable Indexes

DAX

    Source: TradingView, DAX future, daily

The Dax is trading on its all-time highs and seems that it´s not going to stop. The European indexes are not as directional as the American indexes. One of the biggest risks, in my opinion, is an expensive euro because this will slow down the trading with other economic areas.  The ECB will hold a meeting next week that will guide the traders about the future economic policy.

FTSE

     Source: TradingView, FTSE future, daily

The FTSE is another example of great performance. The recovery since the Brexit referendum has been incredible. The uncertainty of the possible split up with Europe hasn´t affected the index. It´s true that after the referendum the British Pound fell a lot and helped some funds to take bigger positions in the stock market.

US indexes


S&P 500

     Source: TradingView, SP500 future, daily



     Source: TradingView, Dow Jones future, daily

The last 2 charts are identical. If an investor opened positions in 2013, now he would have doubled his investment. Some of the biggest investments banks have warned their clients about a possible big sell off to take profits. One of the reasons behind this is that these indexes have never been overbought in their history. In addition, we have seen the largest inflows ever in equity funds.  When everyone is buying after the biggest rally ever, it´s better to take profits while we can. If you don’t believe in this theory, ask the bitcoin investors that bought the cryptocurrency at 19000$.

Opinion

We have seen interesting movements this week. Everyone is monitoring the Central Banks statements. We need to focus on the Bank of Japan and the European Central Bank next week. I would like to see how the ECB deals with a strong Euro. I don’t think that the US government shut down will last long. About the stock markets… well, I said before. These things don’t end well.

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


#BankofCanada #bitcoin #DAX #DowJones #FTSE #FX #indexes #InterestRates #opinion #SP500 #Trading #USDollarIndex

Sunday 14 January 2018

US CPI is King, at least for the interest rate derivatives

I’m a big follower of the economic data. I follow closely the inflation figures because the interest rate markets usually move. It’s difficult to say what you should trade in this situation but it´s easy to predict the direction of the movement. Let’s see what happened and how the markets reacted.

US CPI surprise


I expected a figure in line with the expectations. Maybe, my expectation was driven by the lack of surprises in the European inflation, but I was wrong this time. The US CPI (YoY) was released showing a better than expected figure, 1.8% vs 1.7% expected. At the same time, the US CPI (MoM) showed 0.3% vs  0.2% expected. The party started and the futures markets started to move.

Market reaction


The sell-off in eurodollar futures was expected after the economic indicator release. Let’s start with the 10Y T-Note Futures.


10Y T-Note Futures March 18

10Y T-Note March18 future, 30 min
    Source: TradingView, 10Y T-Note March18 future, 30 min

Good downside move, you can see the importance of this movement in the traded volume in the 30 minutes after the release. It’s not valid to sell at any point, as you can see this future went up after 14:00 London time.

Eurodollar December 18 future

 Eurodollar Dec18 future, daily
    Source: TradingView, Eurodollar Dec18 future, daily

This is a great example of how the American economy has improved from 2016.As you can see it´s in a downtrend since September 2017.


Eurodollar Dec18 future, 30 min
    Source: TradingView, Eurodollar Dec18 future, 30 min

You can see the importance of the data and the scale of the movement in the 30 min chart. It´s funny to think that 7 ticks move is big but you should consider that the size of the trades is usually higher than other futures with more volatility. If there is not a release or news is strange to see big movements in this kind of products.

Different examples, across the interest rate curve 

Eurodollar futures Dec19, Dec20, Dec21, Dec22, own elaboration
     Comparison Eurodollar futures Dec19, Dec20, Dec21, Dec22, own elaboration

All the maturities behave exactly as the December 2018 contract shown before. The December 2021 is different, someone sold at market just in the moment of the release or a little bit before, this is why there is a big gap. The most important thing is that the dec21 move was smaller than the dec20 and dec22. I can see that in the volumes increased in the bounce back for Dec20 and Dec21. It means that the traders don’t want to be short in this maturities. It’s difficult to say if there will be a possible slowdown in the US economy in one year time but I  don’t dismiss this scenario.

Eurodollar Spreads

Eurodollar spread Dec18-Dec19, daily
     Source: TradingView, Eurodollar spread Dec18-Dec19, daily

We can see that this spread is trying to go up from the min of 0.1400, this means that the outlook for the next year is positive. The main problem, and it will be highlighted in the next chart is that the long-term chart shows how the spread is tightening. 


Eurodollar spread Dec20-dec21, daily
     Source: TradingView, Eurodollar spread Dec20-dec21, daily

I´ve selected this spread because shows a clear downtrend. After checking, the Dec19-Dec20 spread shows the same pattern and we can think about the slowdown scenario mentioned before.

Sum up and opinion


I hope you like it. Following the economic indicators and how they affect the markets is one of my hobbies. I’m looking forward to bring this interesting subject and explain the concepts clearly. As you have seen, the better than expected US CPI generated a sell-off in the US bond futures and in the interest rate futures across the whole curve. This doesn’t mean that the rally in equities will last forever and there are signs that could be a slowdown in the US economy in the coming year or year and a half. In terms of the US equity market, I think that it will keep going up in 2018. I use the bank earnings as a leading indicator of the economy.

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



Saturday 6 January 2018

Trading system based on proprietary indicator, Part 3


This is the third part of the series of posts about the trading system based on my own indicator. We will see how the commissions affect the performance of the system. I will compare with the benchmark in the future.

Comparison table




Comparison table including the backtesting with the commissions included and deducted from the portfolio, own elaboration

As you can see there are big differences between the backtesting without commissions and the ones that include them. The daily average return differs in the amount I chose as a broker fee. In this case and considering the size and the price of the security, I decided that the commissions will be 40 Euros per trade (20 Euros per side, buy and sell) Obviously the maximum and minimum daily profit differs in the amount of the broker fee. (There is one problem that I haven't fixed in the 10 Yrs backtesting and 10 Yrs backtesting with Fees. The max profit differs due to an early error in the data) The skewness and kurtosis are exactly the same. The returns have been significantly affected by adding the commissions and taking out the value of the portfolio.In the case of the 5 Yrs Backtesting the return is almost half due to the commissions. Considering that the system trades the same size all the time, this issue was expected. The advantage of that is that as soon as the portfolio grows, and even if the loss is the same amount as the beginning, the loss represents a lower percentage of the portfolio. I chose this way as a risk management in which I risk more in the early years while the portfolio is growing. Probably I should link the trade size with the value of the portfolio but depending on the system or the period studied can generate worse performance and could be riskier. The Sharpe Ratio is affected as well because the returns are lower. Another important point is that including the fees the max drawdown is worse than the one shown before. Depending on how we invest our savings, we should run an extra spreadsheet with all the cost related to the investments. 


Graphical description of how the fees affected to the different backtesting


5 Years test


    Differences between the portfolio with and without commissions, own elaboration


Sometimes a chart represents an idea better than the words. Here we can see the impact of the commissions in the system. The difference in the last trade is almost 5000 Euros. The system returns 37.15% which is the equivalent to 7.43% per year. It´s a good return considering the risk taken. The system without including commissions returns more than 12% per year.

10 Years test


     Differences between the portfolio with and without commissions, own elaboration

The differences are bigger in the 10 years study. The difference between both systems is 28000 euros. At this point is better not to do these numbers, giving away this amount of money is crazy. The best aspect is that after fees it returns an incredible 425%.


Sum up


I hope you like it. You shouldn´t focus on the effect of the commissions or the performance. The most important idea is considering all the cost related to running the trading system or the investments. In this case, I simplify the idea considering that a broker executes the trade on your behalf. If you trade on your own, you should add the market data, the brokerage commissions, and the trading platform costs. There is another point that I haven´t commented, the taxes. Sadly the trading costs and the taxes (if you make money) will reduce your profits.

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

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