Probability Distribution, Statistics - Algorithmic Trading

Поделиться
HTML-код
  • Опубликовано: 29 июл 2021
  • We will discuss how to get trade ideas from a simple probabilikty distribution curve with Apple stock (AAPL) as an example.
    The full trading view pinescript code can be found in the link below:
    www.quantprogram.com/Probabdi...
    Disclaimer: The contents provided in the channel are purely educational. We do not provide any financial or investment advice. There is a very high degree of risk involved in trading. Past results are not indicative of future returns. quantprogram.com and all individuals affiliated with this site assume no responsibilities for your trading and investment results. The contents, videos, columns, articles and all other features are for educational purposes only and should not be construed as investment advice.

Комментарии • 52

  • @honzinuvsvet4102
    @honzinuvsvet4102 2 года назад +14

    This is exactly why I´m trying to focus on ´´facts´´ about market- volume, vwap, stand. deviation also support resistance. Loving your videos!

    • @JoshKings-tr2vc
      @JoshKings-tr2vc Месяц назад

      Any recommendations? I’m just starting out.

  • @felipemiraflores2984
    @felipemiraflores2984 Год назад +8

    This video has opened my eyes when it comes to trading with simple and effective strategies based on probability. Amazing video!!!!

  • @joewarren6439
    @joewarren6439 2 года назад +5

    You are an awesome technician. I love the Stan Weinstein code you provided and have created TOS screens to identify potential trades based on 30 weeks and 50 days both providing many trade possibilities. Thank you.

    • @quantprogram
      @quantprogram  2 года назад +1

      Thanks so much mate. Happy to help

  • @flashrun6093
    @flashrun6093 6 месяцев назад +1

    One can store in code, the value for the variable percentage. In Pine Script, just use a switch for any security desired.

  • @dontbeafool
    @dontbeafool Год назад +8

    good video. you should have a look at meta labling.
    basically, you keep your strategy but you take other metrics like volatility, skewness, autucorrelation,etc. you use them with your backrest results to build a classifier(any ml model) on top of your strategy so that your model can prevent trade execution if it knows with enough certainty it wont be profitable. it eliminates a lot of drawdown

    • @quantprogram
      @quantprogram  Год назад

      Thanks much for the info mate. Will look into this

    • @dontbeafool
      @dontbeafool Год назад

      @@quantprogram do you have discord? I'd love to chat. I just graduated Msc in finance and I've been diving deep into machine learning. Just starting my algo trading journey byt I'm sure we could benefit mutually from sharing knowledge.

    • @quantprogram
      @quantprogram  Год назад +1

      @@dontbeafool Congratulations on your Master in Finance. I have a Masters in Risk Management and Financial Engineering. I learned more outside of my education really. Practical knowledge has its own perks.
      Unfortunately I don't use discord mate. Honestly I just don't have the time to spare. Not to mention the hassle. The youtube thingy itself is just a side passion of mine to teach people the advantages of quantitative based trading. I'll be more than happy to discuss with you via e-mail.

  • @iinself66
    @iinself66 2 месяца назад

    thanks for the video. can you please explain how is this different from Bollinger bands?

  • @matejfrnka8194
    @matejfrnka8194 2 года назад +1

    Hi, what is the app you are using for displaying the stock chart called?

    • @quantprogram
      @quantprogram  2 года назад

      The coding is done both in python and in Tradingview

  • @MrEstebanEscudero
    @MrEstebanEscudero 2 года назад +2

    Great video. Subscribed

  • @FastbreaKHere
    @FastbreaKHere 9 месяцев назад

    In the past Ive tried to model the stock daily returns with the normal distr. but everytime I had a p_value test with very small values (less than 0.001), whereas I got good results with the student T distribution.

    • @quantprogram
      @quantprogram  9 месяцев назад

      Thats interesting mate. Good work. t distribution are used by quants as well

  • @eddiemurphie3429
    @eddiemurphie3429 5 месяцев назад

    This is a long shot ask, will u please teach me !

  • @georgekuh4491
    @georgekuh4491 4 месяца назад

    Can you suggest a book for statistical analysis

  • @stevenaohio
    @stevenaohio Год назад

    I only see 8 lines of code in the link provided in email. Can you provide more detailed or logic of your pine script for code?

    • @quantprogram
      @quantprogram  Год назад

      Hi mate, There are only 8 lines of code for that strategy coded in pinescript. The logic behind the strategy is explained in this video from 04:14.
      If you are looking to understand pinescript coding language thoroughly, please go through are Tradingview Pinescript full tutorial version 5 found on our channel.

  • @ralphpatterson232
    @ralphpatterson232 5 месяцев назад

    Thanks for the video. While I don't mind being on a mailing list if it is informational in nature, but I would appreciate a more direct link to the code you used. The only code available (from the link in the response email) is to the random seed. It would be nice to have the entire Juniper notebook to work with. If I'm missing something please correct me.

    • @quantprogram
      @quantprogram  4 месяца назад

      Hi, Im finding it hard to understand what you're trying to communicate. Firstly the link only gives you the strategy thats discussed in the video, not the jupyter notebook. This was said in the video. I'm not sure if you watched the video thoroughly.
      Secondly, there is no "random seed" in any of the code that we discussed for "probability distribution" video. So i dont know know where you go that info.However random seed function is used for our another video "Jim Simons Simulation Data". I can see from our systems that you have downloaded both. Dont know if you misunderstood which is which.
      The jupyter notebook file for "Probability distribution" wasn't uploaded because all the code for that was discussed line by line in the video, it would probably take you less than 5 minutes for anyone to recreate the code just by watching the code in the video and typing it unlike "simulation data" code.

  • @BoxerDogs
    @BoxerDogs 28 дней назад

    At 1:46, what are the values on the Y-axis and what are the units? What is the Y-axis telling you?

  • @Conork737
    @Conork737 2 года назад

    Do you know if there's an easy way to make the Normal Distribution for stocks via a website or app?

    • @quantprogram
      @quantprogram  2 года назад +1

      Not that i'm aware of mate. But its quite easy in python

    • @Conork737
      @Conork737 2 года назад

      @@quantprogram thanks for the reply, it's actually for an assignment. I found a way via Excel. Thank you for the video though, was very helpful

    • @sharmaasutosh
      @sharmaasutosh 2 года назад

      @@Conork737 please can you tell how we do this through excel

    • @Conork737
      @Conork737 2 года назад +1

      @@sharmaasutosh there's plenty of RUclips videos showing how to if you give it a search. If you can't find one I'll try link one that I used

    • @dontbeafool
      @dontbeafool Год назад +1

      use python and you can fit the true distribution with simple packages like fitter.

  • @brandonjohnson8880
    @brandonjohnson8880 Год назад +1

    The extreme levels also show that the returns are not normal. The distribution is also heavier on the negative side. I believe stock returns are distributed with the Cauchy.
    Try this: calculate the probability under normal assumption that you get a 5% decline. Then compare that with the probability you get from the data. In reality, the data will show a higher probability

    • @quantprogram
      @quantprogram  Год назад

      HI Brandon, Thanks for the comment and I find it interesting but a few questions regarding the approach.
      1.If i am assuming that i get a 5% decline whats the a data that i feed. is it the same as before or only data with the 5% decline?
      2."Then compare that with the probability you get from the data". Compare to which data?. The results i did with the video?

    • @brandonjohnson8880
      @brandonjohnson8880 Год назад

      @@quantprogram yeah, so I was thinking this: calculate your mean and standard deviation from the data. Now construct a normal distribution from these, and find the probability that you get a 5% decline or worse (assumption of normality). Now take your data and find the percentage of days that had 5% or worse. Do they line up? My bet is that your data will show it more frequently than the normal distribution model. This would indicate that the normal distribution is not appropriate.

    • @quantprogram
      @quantprogram  Год назад

      @@brandonjohnson8880 I will give it a go. But my concern is that the amount of days there are when the stock is having 5% or worse is so limited as compared to normal data that its quite unreasonable to use it as a comparative measure. If you understand what i mean. Maybe if i do it for multiple stocks I can get more data

    • @brandonjohnson8880
      @brandonjohnson8880 Год назад

      @@quantprogram you are right. Maybe with more stocks. Also you could try it on a lower timeframe as an experiment (10 min bars) to get more data as a test. Then use a lower return level than 5%

    • @quantprogram
      @quantprogram  Год назад

      @@brandonjohnson8880 Thanks mate, Lower timeframe is a great suggestion. Will look into it

  • @pragneshmistry6845
    @pragneshmistry6845 Год назад

    Sir, the data for the period u have downloaded is normally distributed, so this can apply. But for the same stock if we change the period, the said stock data may not normally distributed, where we may not apply this… please help me

    • @quantprogram
      @quantprogram  11 месяцев назад +2

      Hi Pragnesh, There is no need to change to shorter time frame, that would be a mistake. The more data we have, the more predictive decision we could make. taking shorter periods data is like saying we are going to predict the weather for the next 10 years with just last weeks data.
      Also no stock will be strictly normally distributed. We are taking an assumption of normally distribution and trying to work a model from there.

    • @pragneshmistry6845
      @pragneshmistry6845 11 месяцев назад

      @@quantprogram Thanks for your reply to my previous comment. I understand that using more data is generally better for making predictive decisions. However, I'm still curious about what we can do if we want to create a strategy for data that is not normally distributed.

    • @quantprogram
      @quantprogram  11 месяцев назад +2

      Like I said in the previous comment. We are taking an assumption of a normal distribution. There will never be a perfect normal distribution. The data of stocks over a long time period can show signs of normal distribution but that doesn’t mean it’s strict normal distribution. Many financial models are based on this assumption including black scholes option pricing model.
      I am finding a hard time to understand your situation. If you don’t have data that has traits for normal distribution data then most likely you have limited data. Why would you want to create strategy for limited data?
      Now let’s say you have lots of data for a specific stock and it’s still not having traits of normal distribution. Why would you want to trade that stock?. You see the dilemma. Part of investing and trading process is to say no to some situations or investments. If there is no evidence why bother trade it. Trade something where you can find evidences

  • @navketan1965
    @navketan1965 7 месяцев назад

    Sir, Assuming forex pair prices are random--how often do you think currency reaches past value of daily ADR from opening price(5PM EST) on one given day either up or down--if percentages are low,then trader can make money by just limit orders put in at start of every day(win/lose).Put(for example) buy orders 80%(of ADR) below EOD(end of day)price & stop loss past distance where pair is unlikely to reach most of the times. At the end of day cancel unfilled orders & new orders are entered according to new EOD prices.Vice versa for sell orders.Stop loss reversal order is at where market is unlikely to go most of the times.Seek your wisdom.

    • @quantprogram
      @quantprogram  7 месяцев назад

      This does sound like a market maker strategy method but applied just once a day. but it will hard to backtest as we will never know how many of your limit orders will be filled, some might not be filled. Also the amount of trades might be less in less volatile markets. The risk part could be when you have black swan events. But without a through back test we cant go deep in to understanding the mae and mfe

  • @user-bs1xe9wq4u
    @user-bs1xe9wq4u 2 месяца назад

    I put in my email but cant get reply

  • @talentinvein7213
    @talentinvein7213 Месяц назад

    this look like 80-20 principle. here 68

  • @abcnikhiltripathi
    @abcnikhiltripathi 2 месяца назад

    It looks like your backtest result (1182%) gain doesn't beat the "buy and hold" returns (1700%) between Dec 2009 to Dec 2020.

    • @quantprogram
      @quantprogram  2 месяца назад

      Yes.. I dont understand the context of your message here. No strategy will beat buy and hold of all stocks as practicality most of them where penny stock once. So using buy and hold for x amount of years as comparison measure is useless. The comparison should be done with buy and hold on SPX an index ETF as that is the standard comparative measure. and even for that we should take cagr to dd ratio. The cagr for SPX being 10% AND DD 55% during GFC. This performace is what all investors are trying to beat including buffet or lynch...or any hedge fund performance.

  • @JohnEnergy2012
    @JohnEnergy2012 Год назад