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
  • image.png

  • Posts

    • Copper Elliott Wave Analysis Function - Counter-Trend Mode - Corrective Structure - Zigzag Position -Wave 4 Direction - Wave 5 Details - It appears wave 4 has been completed but we need a confirmation above 4.686 with an impulse break. Otherwise, the price could make a minor corrective bounce below the confirmation level and falter further. Copper prices are reversing upward, recovering from the sell-off that began on May 20, 2024. The broader picture indicates that this sell-off is a correction within the larger bullish cycle that started in October 2023. The current recovery, which began on June 18, 2024, has the potential to rise further and possibly break the high from May 20, 2024.   Daily Chart Analysis: On the daily chart, a bullish impulse wave has been developing since July 2022, when copper hit a low of $3.13. This impulse wave is currently in wave (3). Specifically, wave 3 of (3) concluded at $5.192, and wave 4 of (3) likely ended at the low on June 18. We can anticipate copper prices to recover into wave 5, completing wave (3) above $5.192 before the next pullback for wave (4) occurs. The invalidation level for this wave count is at $3.975.   H4 Chart Analysis: On the H4 chart, wave 4 appears as a double zigzag pattern. Wave a (circled) of 4 ended with an impulse structure, while wave c (circled) concluded with an ending diagonal pattern. A bullish confirmation would occur if the price breaches $4.686 with an impulse wave, indicating a strong likelihood of further recovery.   Alternative Scenario: Alternatively, the decline on the H4 chart could be interpreted as an impulse wave. If this is the case, the current bullish recovery remains valid. However, we would not see a breach of the $5.192 high before the price resumes its downward movement to break below $4.379. Therefore, in both scenarios, copper prices are expected to maintain their current recovery to at least the $4.69-$4.788 range in the near term.   Summary: Copper has been recovering from the sell-off that started on May 20, 2024, within the context of a larger bullish cycle that began in October 2023. On the daily chart, a bullish impulse wave has been forming since July 2022, with wave 3 of (3) completing at $5.192 and wave 4 of (3) likely concluding at the June 18 low. The price is expected to rise into wave 5, surpassing $5.192 before the next pullback for wave (4). The invalidation level for this wave count is at $3.975.   On the H4 chart, wave 4 is identified as a double zigzag, with wave a (circled) ending in an impulse and wave c (circled) in an ending diagonal. Bullish confirmation would be a break above $4.686 with an impulse wave, signaling further recovery.    Alternatively, if the decline is an impulse wave, the bullish recovery is still valid but without breaching $5.192 before dropping below $4.379. In either scenario, copper prices are likely to continue recovering to the $4.69-$4.788 range in the near term. Technical Analyst : Sanmi Adeagbo Source : Tradinglounge.com get trial here!  
    • ADI Elliott Wave Analysis Trading Lounge Daily Chart, Analog Devices Inc., (ADI) Daily Chart ADI Elliott Wave Technical Analysis FUNCTION: Trend MODE: Impulsive STRUCTURE: Motive POSITION: Minor wave 3 DIRECTION: Top in 3.   DETAILS: Looking for continuation higher towards medium level at 250$. We have a nice alternation between a sideways wave {iv} and a sharp wave {ii}.   ADI Elliott Wave Analysis Trading Lounge 4Hr Chart, Analog Devices Inc., (ADI) 4Hr Chart ADI Elliott Wave Technical Analysis FUNCTION: Trend MODE: Impulsive STRUCTURE: Motive   POSITION: Wave {v}. DIRECTION: Upside in wave {v}. DETAILS: We seem to have completed the correction in wave {iv} with a clear three wave structure. Looking for continuation higher into equality of {v} vs. {i} at 254$.   Welcome to our latest Elliott Wave analysis for Analog Devices Inc. (ADI) as of June 19, 2024. This analysis provides an in-depth look at ADI's price movements using the Elliott Wave Theory, helping traders identify potential opportunities based on current trends and market structure. We will cover insights from both the daily and 4-hour charts to offer a comprehensive perspective on ADI's market behavior.   * ADI Elliott Wave Technical Analysis – Daily Chart* In our Elliott Wave analysis of Analog Devices Inc. (ADI), we observe an impulsive trend pattern characterized by a motive structure. ADI is currently positioned in Minor wave 3, indicating a continuation higher towards the medium level at $250. The wave structure shows a clear alternation between a sideways wave {iv} and a sharp wave {ii}, which is a typical feature in Elliott Wave theory, suggesting healthy trend progression. Traders should monitor for the top in Minor wave 3 and the potential transition into wave {v}, which could offer opportunities for profit-taking or strategic adjustments to long positions.   * ADI Elliott Wave Technical Analysis – 4Hr Chart* On the 4-hour chart, ADI continues to follow an impulsive trend mode within a motive structure, specifically in wave {v}. The recent correction in wave {iv} appears to have completed with a clear three-wave structure, indicating a possible resumption of the uptrend. The target for wave {v} is set at the equality of {v} vs. {i} at $254. Traders should look for confirmation of this upward movement as the wave {v} progresses towards the target level, which may present opportunities for entering long positions or adding to existing ones.   Technical Analyst : Alessio Barretta Source : Tradinglounge.com get trial here!  
    • Asian shares rose to a one-month high on Wednesday, led by a rally in tech stocks like Nvidia which surpassed Microsoft to become the world's most valuable company. The dollar was steady as soft US retail sales data reinforced expectations of the Federal Reserve cutting interest rates later this year. Markets are pricing in around 48 basis points of rate cuts by the Fed in 2024. Trading is expected to be muted due to the US markets being closed for the Juneteenth holiday on Wednesday. Oil prices were steady, with Brent crude around $85 per barrel and WTI crude near $81.5 per barrel. UK inflation slowed to 2% year-on-year in May, from 2.3%, and held at 0.3% month-on-month. Core CPI slowed to 3.5% YoY from 3.9%. 
×
×
  • Create New...
us