Sunday, 19 April 2020

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 build up the account to be able to deal with possible drawdowns.


6B 06/20 day chart
6B 06/20 future























Monday was a very quiet day in comparison with the previous days. The British Pound jumped 
almost 50 pips early in the morning but after that, the USD recover its strength. This changed again after midday when the price started to rise again.


6B 06/20 13/04/2020
6B 06/20 trade chart

I realized that I had a notification. My algo bought 5 lots during a retracement. In the beginning, it went against me, but it quickly recovered. It didn’t make a big movement but was more than enough to finish the day with a small profit. I personally don’t like to take positions at that time on the day because the algo closes the positions around 17:00. To be honest, it doesn’t matter if I like it or not, what I need to do is check that it’s statistically significant.  


Profit and new account balance



Trade 13/04/2020
Trade 13/04/2020

As I said, it was a small profit, but these kinds of days help to build up the account. The maximum adverse excursion was small. The algo closed the position close to the maximum favorable excursion which I’m very happy about. I have the feeling that I’m leaving a lot of money on the table. I am allowed to make one change in the algo during the competition and I’m seriously considering adding a take profit. These will reduce the time in which the algo maintains positions open and more importantly it will secure profits. On the other hand, it won’t let the profits run as much this is why I need to carefully check before I implement the change.


Account balance and realized PnL
Account balance and realized PnL


The account balance at the end of the day was $1003468.75. Even if it’s not real money, I feel very well because the algo is behaving as I expected and it’s able to recover from drawdowns.

Thanks for reading this post!

Thursday, 16 April 2020

7th day, huge profit


After almost recovering the losses from previous days, I had a lot of energy and I wanted to switch on the system as soon as possible. To be honest, this doesn’t matter. When I was designing the system, I decided to set up a time window to be able to control the algo and make sure that the positions were closed before the end of the day.

6E 06/20 breaking
6E 06/20 breaking moment


I was expecting that the Fed approval of its new loan program and I knew that it will have a big impact in the markets that the algo trades.
Early in the morning, the USD was stronger than the Euro and the British Pound. The algo was triggered in both crosses almost at the same time while the futures were retracing.  Let see how these currency futures behaved during the day:

Euro FX

As I said before, the algo was triggered just after 11:30 London Time. I was a bit surprised but all of the conditions were met and the algo sent the market order. After that, I was monitoring the pile of red candles until 12:45. At that point, the market started recovering. Considering the news, I hoped that the market would break the highs of the day.

6E 06/20 trade chart
6E 06/20 trade chart


At the beginning of the US trading session, the news started coming up.  The FED approved the new loan to help to bolster local governments and small and mid-sized businesses. Obviously, all central banks and governments are trying to help their economies as much as they can. I believe that some of the measures will be highly effective while other ones will only help to increase the debts of the countries. At the same time, the initial jobless claims data was released. It was far worse than expected. The Euro rocketed from 1.0900 to 1.0960. After this moment, the market stayed ranging between 1.0940 and 1.0960 for four hours.

British Pound

6B 06/20 trade chart


The case of the British Pound was exactly the same but the daily range was lower than in the Euro. As you can see the retracement was bigger in the GBP/USD at least until 17:30 where it rebounded aggressively.

Trades and Account

It was a great day in terms of profit. The algo generated $3220 in the Euro and $688.75 in the British Pound.

Realized profit by the algo applied to EuroFx and British Pound Futures
Realized profit by the algo applied to EuroFx and British Pound Futures
It was the first day with a positive P/L and it was a boost to my confidence.

Account


Summary

When you have an algorithmic or even a simple trading strategy is difficult to deal with the news and the macroeconomic data releases. In the example shown, the market when in the direction of the algo but you should be aware that sometimes it will go against you. I would like to recommend to always use stop losses.

Monday, 13 April 2020

6th day, no gain no loss…



As you can imagine after reading the title, it was a flat day. Actually, I made a small profit but it didn’t cover the commissions. Let’s see what happened during that day in the EUR/USD and GBP/USD futures:


British Pound


It was a directional day for the British Pound without any big spike or swings as we saw in the previous days.  This was explained by the increase of COVID-19 cases in the US and the expected approval of further help by the FED.

6B 06/20 


It raised almost without stopping until 14:30 where the price was ranging between 1.2387 and 1.2405. In one of these retracements, the algo was triggered and it sent a buy of 5 lots. I wasn’t sure about opening the position considering its morning trend and range. One of the best aspects of using algos is that we remove discretionary decisions and feelings. After entering in the position, like the most part of the times, the GBP/USD futures fell to 1.2374. After that, it rebounded breaking the highs of the day and it reached the 1.2429 level. It couldn’t breach these levels and it went back to 1.2400 where the algo closed the position.

6B 06/20 trade chart


This chart shows more detailed of what I explained in the previous paragraph.

6B 06/20 trade


In contrast with other days, the MAE ($437.50) is around 1/3 of the MFE ($1281.25) and this shows how well the market behaved for the algo I’m using. One of the problems is that the ETD is still high because the algo is not closing with a signal. Until now, the algo has closed according to the time configured.


Euro FX


The Euro vs the US Dollar didn’t have a clear trend. It was a total swing. It seems that the EUR was stronger in the morning while the USD took its place in the afternoon.

6E 06/20


As you can see, and as it was expected, the algo was triggered in a retracement. It performed well during the first hour. After that, the Euro dropped strongly but seems that the traders didn’t believe in this movement and the buying pressure took the price to the point in which the position was open. At this point, it continued to rise to 1.0909 where the dollar strength came back. The position was closed at 17:08 London Time

Trades and account balance


I didn’t get profit in both trades. I lost $398.75 in the EuroFX trade including commissions and I won $395.75 in the British Pound also including commissions.

08/04/2020 trades


I shouldn’t be upset… I made a profit without considering commissions. At the end of the day is not real money and this is good learning and I would like to remember that in my opinion the commissions and the slippage should be included when you are backtesting a system. In my experience, if the system is not good enough this will make the difference between making profit or loss.

Account Balance


One of the conclusions that I found in the first 6 days is that probably I should implement a fixed take profit or maybe consider a trailing stop. It’s early to say but probably I will run some tests to see if the statistic ratios are better than my current algo.

Thanks for reading this post!


#algorithmic_trading, #Trading, #Euro, #EUR, #GBP, #British Pound, #USD, #EURUSD, #GBPUSD, #Dollar, #performance, #profit, #loss, #FED, #COVID-19, #Robotrader

Sunday, 12 April 2020

Day 5, Profit after a hard day


The 5th day was a positive day. It was the first day in which the algo was triggered in Euro FX future, known as 6E in CME. Until this moment, the algo was executing orders only in the British Pound futures. Let’s have a look at both instruments:

Euro FX

The algo performed very well showing its real purpose. It entered long in a retracement and luckily after that, the Euro went up. It was a very directional day.

6E 06/20 

 
As you can see there were only 2 moments in the day in which the position was losing money.


Orders 6E 06/20

The final profit was $1657.50. 


British Pound

As I said before this currency cross has been recently quite volatile in comparison with the Euro/USD. I believe that the news has a bigger impact on this instrument.

6B 06/20


I was looking at the different parameters when the notification popped up on my screen. At that moment, I had a feeling that this trade couldn’t end up in profit. I saw the P&L falling continuously for an hour. After that, the price went up to the point in which I entered. I felt a little relieved but I knew that it won’t last. It dropped again making a double bottom. Even if I don’t believe or follow the charts, I had a little belief that maybe the price will go up again breaking the confirmation line. I was right. The price went from 1.2292 to 1.2395. As soon as the US trading session started, the USD raised versus other currencies. This pair plunged to 1.2303 from the maximum of the day. I believe that after a big movement the prices always revert to their mean but we need to be careful in the current situation. I was lucky because the price recovered more or less 60% of the last downside movement and at that time, my algo closed the position making a small profit.


Trade 6B 06/20


As you can see the MAE shows that at 1 point I was losing more than $1400. We can also see a big MFE showing almost $1800, that was reached after the double bottom. Sadly, as you know, even if it’s not real money, the final profit was far from the MFE. This is why the End Trading Drawdown shows up as $1373.75 the difference between the maximum favorable excursion and the final profit.


Final Profit


The final result was $2127.50. I was happy to have this profit after the losses from the previous week.

Thanks for reading this post. 

Friday, 10 April 2020

The algo, day 1, 2, 3 and 4


Hi, I would like to start this post introducing the idea behind the algo. Also, I would like to highlight that this is not financial advice because the purpose of this algo is to participate in a simulated algo trading competition.

Current situation

One of the first questions that came to my mind was about the current situation with the Covid-19 and how it would evolve during the competition. At that point, was very tricky because it’s very difficult to forecast the future and to be honest, I don’t know how the markets will react to the help provided by the central banks. I see some similarities with the financial crisis, but I believe that there are more unknowns and the lockdowns extensions can trigger some bankruptcies for small and medium businesses. This will result in a decrease in consumption and the gross domestic products will reflect this as well. The financial situation of some companies and individuals will deteriorate and this will affect the banking sector. This issue can have a domino effect. Luckily, the central banks and the national governments are taking measures to try to avoid the spread of the disease and try to go back to normality (even if it’s done gradually)

The algo

I was considering different types of algos before the competition. As you know, some of the most important algo types are:
  • trend following 
  • mean reversion
  • volatility breakout
  • range algos

As I explained in the previous paragraph, the situation was one of my biggest concerns and I was expecting the volatility to continue at least for 3 months. Considering that the central banks were approving measures, I thought that the markets could have some rebounds. This is why I decided to design an algo that is able to catch the trend after a retracement. The main indicators used are two Exponential Moving Averages and a Stochastic.

I chose the Euro FX (6E on CME) future and the British Pound future (6B on CME) and every time that the algo is triggered, it sends a 5 lots order.

Day 1, 2 and 4


The algo was triggered only in the British Pound futures during the first 4 days. I lost $655 in the first trade, as you can see it wasn’t the best day. Its maximum adverse excursion was $875 and the maximum favorable excursion was $500 (this explains that the position was showing $500 profit at a certain time during the position was open) 

The second day was far worse because it hit the stop loss. The similarity with the first trade is the maximum favorable excursion that reached $562.5 at some point during the session.

I didn’t have any entry on the third day.

Finally, I had a small profit on the 6th of April. It was the most volatile day.




Summary

I have introduced a brief opinion of the current situation and I have explained how it was one of the most important facts to choose the algo for the competition. I have shared the idea of the algo and I have reviewed the first 4 days. I will keep posting how the algo is performing and interesting facts that can explain some movements in the Euro and the British Pound futures.

Wednesday, 8 April 2020

Robotrader2020, algorithmic trading competition


I decided to participate in Robotrader and I believe that is worth to share my experience here.

I consider Robotrader as one of the referents in algorithmic trading education in Spain. It offers a series of lectures or seminars with some of the best professionals in algorithmic trading, investment banking, and technology.  In addition, it holds a competition in which the participants need to create an algo to trade automatically for two months. This is the 10th edition and it’s been a great so far.

The main purpose is to introduce the world of trading and automatic investing to students and invite them to do it using different programming languages.
I think that it is a great initiative even if you have knowledge about investing in financial markets. It is very difficult to find professionals with knowledge in both areas. To be honest, it helps you to understand how difficult is to try to merge one traditional area like trading with technology. Obviously, it depends on each student, some of them will focus on high-frequency trading systems while others will focus in a more traditional trading system.  One of the things that I like the most is that it challenges you on the technology side. I mean, it’s not only programming the algo. It involves making research, try to understand how the markets move, designing the algo, backtesting, optimizing, choosing the right money management system, and putting this in production through a paper trading account. And when you think that you are done…  don’t forget to deal with connectivity because if you don’t connect, the orders won’t be sent to the exchange.



I will be sharing my experience during the competition. It started last week so I have a couple of articles to post.

Finally, I would like to thank the Universidad Politecnica de Madrid (and everyone that is supporting this event) for this initiative.  Please see this link if you want to have a look:




Thanks for reading this post. 

Tuesday, 25 September 2018

Looking at LS Crude Oil and its opportunities with calendar spreads


Introduction

As you know, the oil futures are on the move. Everything indicates that the LS Crude oil is heading to 80 according to Goldman Sachs and JP Morgan. I believe that it’s possible to reach 80 before 2019 considering the current price and its momentum. It´s an 11% upside from the current price. The LS Crude Oil Oct18 started the year at 58.58$ and yesterday, it closed at 72.27$.


LS Crude Oil Oct18

LS Crude Oil Nov 18, daily,
    LS Crude Oil Nov 18, daily, source: TradingView

This is the perfect chart to explain how this commodity has performed this year. It represents 24.39% up in the year. After the last OPEC meeting seems that has more upside potential because they didn’t agree on any increase in the oil production.


The Spreads

LS Crude Oil Dec18-Jan19 Spread, daily
    LS Crude Oil Dec18-Jan19 Spread, daily, source: TradingView

Probably this is the best spread for new traders or even for experienced traders because they will have a lot of opportunities with limited risk. The spread has been ranging between 0 and 0.80 the most part of the time.  You can see that each time that it opened above this level was a clear sell signal.


LS Crude Oil Dec18-Mar19 spread, daily
   LS Crude Oil Dec18-Mar19 spread, daily, source: TradingView

We can see a bigger range in the 3-month spread as it was expected. I´ve never been involved with energy products but looking at the chart. I would consider buying below 0.60 and selling above 1.80. This is an easy conclusion, however, trading this spread is not that simple.  


LS Crude Oil Dec18-Jun19 spread, daily
     LS Crude Oil Dec18-Jun19 spread, daily, source: TradingView

To be honest, this spread seems an outright. When the front contract falls, the spread falls really aggressively at least in the first 7 months of the year. Both outrights have been converging in the last 2 month.


Conclusion


As I said, I haven´t been involved with energy products and this is why this post is not as big as the other ones. It´s a great product and there are so many ways of trading it. I think the Oct contract will keep going up. I’m not sure about the movement of the spreads because the back of the curve is converging with the front (as we saw in the 3-month and 6-month spread). Probably the producers are buying futures because they expect higher prices of this commodity in the future. I hope you like.

Have a good trading!!

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