Trading Strategy in Python Using Conditional Probability

preview_player
Показать описание
#tradingstrategy #python #codingtutorial #algorithmictrading #probability

What is this Trading Algorithm? 00:00 – 00:27
Get Historic Weekly Data 00:27 – 02:09
Conditional Probability 02:09 – 03:01
Mind of the Trading Algorithm 03:01 – 07:54
Visualize the Algorithm 07:54 – 08:38
Back Testing the Algorithm 08:38 – 10:26

In this video, we will create a trading algorithm that uses weekly conditional probability to buy or sell stock.

The trading algorithm buys and sells stocks weekly based on the conditional probability that the stock return will be positive this week given the return of last week. If the probability is greater than 50%, then the trading algorithm in python will automatically buy the stock. If the probability is less than 50%, then the trading algorithm will sell the stock.

This video will also use plotly in python to visualize the buy and sell signals from the algorithmic trading bot. We will also program a new conditional probability oscillator to see how the probability changes overtime.

Topics this coding video explores:
How to Code a Trading Algorithm in Python, How to use probability in stock market, Trade stocks using probability, Conditional Probability in Trading, How to Make a Trading Algorithm in Python, Algorithmic Trading in Python, Build an Oscillator in Python, Program a Trading Algorithm in Python, How to Back Test a Trading Strategy in Python

Intrendias is not financial advice
Рекомендации по теме
Комментарии
Автор

Though this is already a very good scientific approach, you'd better calculate not the conditional probability, but the conditional expectation. It is the expectation which defines the profitability of the consequent strategy, not the probability, because besides the probability there's also an average win / average loss ratio, which in case of asymmetry towards losses can effectively negate your probability based edge.

johnsmith-qcud
Автор

Hey, loved the video. I'm currently working on a project in which I'm using python to create a portfolio rebalancing program that uses a mixture of basic metrics, but also incorporating sentiment analysis, and then uses real time data to see if any of the current holdings cross a threshold change in a mix of the metrics, then buys or sells in accordance with that change. Do you have any advice? Thanks

jonazpe
Автор

hi, nice video, but where to start studying algorithmic trading? i have python data science knowledge. can you advise something?

kweeck
Автор

can you share the code of this strategy

aryanmanjunatha
Автор

hello there. Is it possible to program a bot with this strategy?

dinizvitor
Автор

there is no explanation why the previous week's return likelihood has any bearing on the next week's performance - so a bunch of pseudo-science perhaps?

PerriPaprikash
visit shbcf.ru