Analyzing similar patterns in the past

Discussion in 'Technical Analysis' started by aimaster, Mar 5, 2019.

  1. aimaster

    aimaster

    Hi
    These are the top most similar patterns in the past for some symbols with their further continuation. Do you find such type of analysis useful for manual trading?

    BRENT_1D.png SP500_1D.png USDJPY_4H.png
     
    murray t turtle likes this.
  2. Peter8519

    Peter8519

    Generally, the slope for down trend is steeper than up trend.
    On this basis, once the gap increase, the odd of changing direction increase.
     
  3. I've often thought this would be useful, but there are so many variables that I can't imagine patterns repeat enough when non-chart variables are different.
     
  4. MattZ

    MattZ Sponsor

    Analyzing patterns is a good way to analyze the markets, but what could determine success is your exit plan when things do not go in your favor (risk management). This applies to any reference system.
     
    apdxyk likes this.
  5. tommcginnis

    tommcginnis

    This is the sort of horrid pseudo-science claptrap that gives so-called Technical Analysis its bad name.

    Oh, wait -- I'm sorry: what is your thesis here?
    -- what were the primary drivers of the first charts?
    -- what commonalities drove the 'patterns' of the follow-up charts?
    -- what are the triggers that caused the follow-up charts to begin executing the re-play of the prior 'pattern' on that particular date?

    What's that?
    You *have* no such thesis???
    Okay then, we're back to horrid pseudo-science claptrap.
    Dr. Elliot Fibo-Gann-oci's Clown School and Snake Oil Cookery.


    [But, sporting a name like "AIMaster", I'm leaving open the idea that the OP has at least some rules-based RPA-coined AI-generating empirically-derived thought that one pattern resembles a prior pattern through some discernible, repeatable, non-random, exploitable factor. Perhaps.]
     
    Last edited: Mar 5, 2019
  6. Here are quantitative and algorithmic strategies I had heard about
    • Kalman filters
    • hidden markov models
    • topological manifold learning
    • non-linear kernel regression techniques
    • APT type factor models
    • monte carlo options pricing techniques
    • continuous time APT factor models with latent variables
    • spectral techniques for doing bag of words extraction of factors from natural language corpus for generating forcings for stochastic partial differential models of asset dynamics
    • pairs trading/mean regression statistical arbitrage strategies
    • automatic graphical model construction (structural inference over dynamic Bayesian networks)
    • reinforcement learning based pairs trading strategies http://www.jair.org/media/1336/l...
    • information theory based investment strategies; see http://en.wikipedia.org/wiki/Gam...
    • J. L. Kelly, Jr., "A New Interpretation of Information Rate," Bell System Technical Journal, Vol. 35, July 1956, pp. 917-26
    • Sparse over complete basis function methods for feature extraction
    • applications 'information geometry'; a field on the border between information theory, probability theory and differential geometry; still very new
    • anything that can be used to model or extract features from a time series
     
    Sprout and tommcginnis like this.
  7. tommcginnis

    tommcginnis

    Not to be too graphic, but the two-word reply that comes to mind is "Science boner."

    I wonder what would happen if I googled "Science boner"..........
    Huh!
    https://www.urbandictionary.com/define.php?term=science boner
     
  8. ph1l

    ph1l

    I think the theory of predictive chart patterns is something like:
    When a current chart pattern closely matches enough prior chart patterns,
    and the chart patterns after the closely-matching prior chart patterns are similar enough,
    the future chart pattern might be similar to the chart patterns after the closely-matching prior chart patterns.

    Concrete example (with a lot of help from software):
    - For a set of 415 ETFs, find over some time, charts for 252 trading days (approximately one year) of data as history, followed by a simulated entry at the close the next day, followed by a simulated exit at the close 21 trading days later (approximately one month). This example uses 873,185 of those historical charts.
    - For these 415 ETFs, find the most recent chart for 252 trading days.
    - Compare each of those most recent charts with each of the 873,185 historical charts by some distance measure such as a Euclidean-type distance weighted so more recent days have higher weight.
    - For each of the most recent charts, take the 5,000 closest historical charts, calculate a performance measure for the simulated future part of the historical charts (e.g., a risk-adjusted return).
    - Take a typical value of these performance measures (e.g., the median) and account for how the performance measures vary (e.g., divide by the sample standard deviation of these performance measures).
    - This new adjusted performance measure could be used to rank the 415 ETFs. And when the value is considered good enough, a trade entry might be warranted.

    For data as of the close March 5, 2019, a chart for KraneShares Bosera MSCI China A Share ETF (KBA) is:
    KBA_20190305_eod.jpg

    And a closely-matching prior chart might be WisdomTree India Earnings Fund (EPI) is:
    EPI_prior.jpg

    With the future chart of EPI:
    EPI_after_prior.jpg

    Data about some of the other charts close to KBA:
    KBA_20190305_hits.jpg

    Data with distance statistics and rankings by the adjusted performance measure:
    ranks_by_score_20190305.jpg

    Notice for the closest historical chart (EPI), the future chart would have resulted in a loss for a long trade. But the overall performance of the simulated future part of the 5,000 closest historical charts was positive for long trades.
     
    userque likes this.
  9. ph1l

    ph1l

    I meant for the above post to be a reply to

     
  10. aimaster

    aimaster

    Thank you, this is great explanation of the idea! May I ask you some questions?
    1. Have you used this in the real trade or this is just research now?
    2. Did you try to add some other factors like corporate or macroeconomics news? For example, exclude from 5000 similar chart patterns those which didn't have any important news?
    3. What software do you use for this analysis?
    4. Did you try something else (DTW for example) instead of Euclidian metric? Euclidian metric requires the same windows length. But the closely-matching chart patterns can have small difference in the time window.
    5. Did you analyze the shape of the chart patterns after the closely-matching prior chart patterns? Let's say for example take in account not only median and std of price change but Euclidian metric std.
    6. How did you get 873,185 historical charts? By sliding window with one day offset?
    7. Is your risk-adjusted return a difference between return and mean return of all 415ETF? Or something like SP500?
     
    #10     Mar 7, 2019