Jump to content

Systematic Swing trading / backtest

Recommended Posts

Hello,

I am working as a quant in the financial markets, I have a background in computer science, big data, machine learning, artificial intelligence.

I have a personal systematic swing trading project. I'm automating and backtesting a strategy based on a cup and handle pattern, i.e. buy on resistance breakout, on a daily basis for now.

I'm making good progress, I have advanced detection of beautiful patterns and the first results are interesting. See image of a trade made automatically, signal: S, entry: ▲, exit: ▼, stoploss in red, rebound on resistance: blue stars.

tradeexemple2.thumb.png.6271204ab977b5247110e20f50dcdacc.png

But unfortunately, I haven't followed any course/training and I have no trading experience on this strategy, so I'm looking for people who are interested in this topic. I still have a lot of things to refine: money management, entry of position, exit of position, management of stops. On each of these points there are plenty of ways to proceed.

So, if you are interested in this pattern type, or want to verify a strategy, I can verify it with a backtest over 40 years, and even then on different markets and different timeframes.

Example of points that I will soon address / refine:

  1. What do you thing about selling half the position when you reach R1?
  2. How many open trades in parallel?
  3. What if all the capital is invested and a new opportunity comes up?

Share this post


Link to post
On 07/10/2020 at 20:08, sysswing said:

I have a background in computer science, big data, machine learning, artificial intelligence.

 

In that case I would advise getting a real job

  • Great! 1
  • Thought provoking 1
  • Sad 1

Share this post


Link to post

Why don't you try to automate it in RealPro Time. It is free for a Demo account

Share this post


Link to post

Hi Syswing,

This is good work, I have tried writing code that picks up visual patterns before and it was very hard! Once you have this bit sorted, the other parts should follow fairly easily.

As you have a background in computer science, you know how to write you code in "interchangeable blocks" etc etc. So I suggest keeping it REALLY simple, then updating as you go along. Every part of the trading strategy is important, but imo you will struggle to turn a 60% loss into a winning strategy by tweaking the other parts. So make sure your core idea (entry and exit) is a winner.

1) Exit point: You will want to try a variety of exit points, and maybe a combination based on level and time. For a first attempt, set your sell point at 2x your risk. You will need to do as much work on your exits as you do on your entry.

2) This is linked to total capital usage. Go with 4-6 open trades. If you are following several markets, consider only taking the strongest signals.

3) Good rule of thumb, MAX 2% equity at risk per trade, with 6% at any one time. As trades earn money, consider moving the stop loss up to lock in the PnL, which allows you to open more trades. For a first attempt, just have three trades at 2% equity, and build it up from there.

Share this post


Link to post
On 07/10/2020 at 20:08, sysswing said:

Hello,

I am working as a quant in the financial markets, I have a background in computer science, big data, machine learning, artificial intelligence.

I have a personal systematic swing trading project. I'm automating and backtesting a strategy based on a cup and handle pattern, i.e. buy on resistance breakout, on a daily basis for now.

 

A quant that knows about the 3 hardest topics within computer science tries to use a cup and handle pattern. Really?

This is how a quant would ask a question:

https://quant.stackexchange.com/questions/58604/has-a-closed-form-formula-for-the-collateral-choice-option-been-found

 

  • Thought provoking 1
  • Sad 1

Share this post


Link to post
1 hour ago, jlz said:

A quant that knows about the 3 hardest topics within computer science tries to use a cup and handle pattern. Really?

This is how a quant would ask a question:

https://quant.stackexchange.com/questions/58604/has-a-closed-form-formula-for-the-collateral-choice-option-been-found

 

Maybe he/she is not actually a quant. A quant would probably know the answer to the questions they had asked. And don't even get started about the compliance aspects! 

Share this post


Link to post

"“Why don’t we have enough teachers of math and science in the public schools?  One answer is, well, if they knew the subject well, they’d also know enough to work for Google or Goldman Sachs or God knows where.”"

 

https://millyuns.com/quotes-simons/

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Member Statistics

    • Total Topics
      12,821
    • Total Posts
      65,801
    • Total Members
      86,821
    Newest Member
    Eleanoralice
    Joined 29/10/20 08:36
  • Posts

    • Start the conversation The US election is scheduled for Tuesday 3 November 2020, when all 50 states and Washington DC will cast their votes. The vote spans six different time zones, so the first exit polls will be available at around 11pm (EST) when West Coast voting closes. In the UK, that will be around 4am (GMT) on Wednesday 4 November 2020. The election is likely to create opportunities for traders, with price movements expected across a range of forex pairs, indices and commodities in the run-up to polling day. Volatility related to the election could continue until congress certifies the result on Wednesday 6 January 2021, or even until the winner is inaugurated on Wednesday 20 January 2021. What should traders expect to see during the US election? All US markets tend to experience increased volatility in the run up to a presidential election, including USD forex pairs, indices and commodities. That’s because many investors will attempt to lock in positions before the result is announced – using polls to gauge public sentiment. The aim is to take full advantage of the price moves that occur when the country’s political direction is confirmed. At the top level, early indications suggest that the following could be on the cards if one of these two main candidates win: Donald Trump A Trump win could see an escalation of the trade war, potentially causing problems for some US exporters and having a negative impact on the value of the dollar. However, this effect could be offset by reassurances that tax cuts and deregulation will continue – boosting the US economy. Joe Biden A Biden win could see tensions in the trade war cool, providing a boost to US exporters and the dollar. However, these effects could be offset by tax increases for high-income households, and more limited deregulation.   How will markets react to the different candidates? Market commentary by IG Senior Market Analyst Joshua Mahony Stocks Markets hate uncertainty, and historically the perception has been that a new president might bring policies that could be harmful for stocks. This happened in 2016 when analysts were confident that a Trump presidency would spark a market collapse. But, we are now seeing that same fear creep in as people consider a Biden presidency and the potential uncertainty it could cause. Biden is openly more left-leaning, and his policies are expected to be geared towards human needs rather than those of investors and traders. This sentiment isn’t helped by suggestions that Biden would reverse Trump’s tax cuts, and it is likely that markets will rise alongside the potentially increased chance of a Trump victory as we approach the election. USD The value of a currency is supposed to reflect the health of an economy and its future prospects. Many are expecting Biden to be less focused on the markets than his Republican opponent, so the dollar could weaken in the event of a Biden victory. However, this effect could be offset if Biden is able to improve relations between the US and China after years of market anxiety. In this scenario, it would be the Chinese yuan which may benefit the most, with the trade war having sparked huge upside for USD/CNH. Keep in mind that if the wider markets fall on a Biden victory – including US stocks and indices – the dollar would likely rally in the short-term to reflect a risk-off move as investors turn to USD. Gold The prospect of a more expansive fiscal policy under Biden, and from a government which is happy to embark on substantial spending programmes, could provide a boost to precious metals. There’s a caveat here too, because in the past precious metals have also followed the same patterns as the stock markets during times of crisis. So, any collapse in equity markets that may come from a change at the White House could drag gold lower in the immediate period. Plus, while Trump has finally seen the kind of stimulus he would have hoped for, a Biden win could result in a more substantial stimulus package if the Democrats gain a foothold in Congress.   How are you trading?
    • Dax has been volatile today. Down 600, Dax down 4% on COVID fears. US open in 10 minutes. 
×
×