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?
Link to comment

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.

Link to comment
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
Link to comment
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! 

Link to comment

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
  • Posts

    • Sainsburys full year earnings and Unilever’s first quarter trading update both say the same thing, UK consumers are in for higher prices. The war in Ukraine, supply chain issues and the effects of ongoing Covid all to blame.      
    • US Dollar (DXY) Daily Price and Analysis US Q1 GDP may stall the greenback’s advance. A 20-year high nears for the US dollar. The multi-month US dollar rally continues with the greenback printing a fresh high today ahead of the first look at US Q1 GDP at 12.30 GMT. The US dollar basket (DXY) has been boosted by renewed weakness in the Euro and the Japanese Yen, as investors move from lower-yielding to higher-yielding currencies, while safe-haven flows continue to benefit the greenback. The US growth release later in the session is expected to show a sharp slowdown from the robust Q4 figure of 6.9%. The markets are currently pricing in growth of just 1% for the first three months of this year, with the slowdown mainly due to a reduction in inventory accrual over the quarter. This release is unlikely to move the greenback, unless there is a large miss or beat, as the Fed believe that 2022 US growth will be robust enough to let them tighten monetary policy sharply without damaging the economy. The latest US Core PCE data – the Fed’s preferred inflation reading – is released on Friday and this may have more effect on the US dollar than today’s GDP data. For all market moving economic data and events, see the DailyFX Calendar. The ongoing US dollar rally has been aided by weakness across a range of G7 currencies including the Euro, the Japanese Yen, and the British Pound. The Euro continues to battle with lowly growth expectations, exacerbated by energy concerns, the British Pound is mired by weak economic data, while the Japanese Yen is in freefall as the BoJ continues with its ultra-loose monetary policy.   The US dollar continues to press higher and looks set to break above 103.96, the March 2020 high. Above here the US dollar would be back at levels last seen nearly two decades ago. The March resistance will likely hold in the short-term, especially with month-end portfolio rebalancing at the end of the week, but US dollar strength is set to continue in the months ahead. USDOLLAR (DXY) WEEKLY PRICE CHART – APRIL 28, 2022 {{THE_FUNDAMENTALS_OF_BREAKOUT_TRADING}} What is your view on the US Dollar – bullish or bearish?   Apr 28, 2022 | DailyFX Nick Cawley, Strategist
    • While Tesla has nothing directly to do with Elon Musk buying Twitter - TSLA stock closed down 12% on news that Musk may have to sell stock and use other holdings to stand against the loan to finalise the purchase of the social media giant.        
×
×
  • Create New...