Hi. The cell with np.linalg... should start with lr = np.linalg... Probably it works in the video because I must have run the code earlier and the lr variable was still in memory
You can get to the same place using either method of calculating change, with slightly different formulations, but in Finance since you are often comparing different asset classes and many compound continuously, we use a continuously compounding formulation. It does make discounting cashflows a little cleaner and is widely used in applications such as pricing options and VaR.
So DataFrames and Arrays aren't really designed to "add rows". Proabably the best way will be to dimension the Frame or array with an extra empty row that can be then populated with your forecast. Usually you just output the forecast separately.
For sure. If we can think of it, we can do it. But how do you mean? Like a side-by-side comparison? Or maybe saving the data and recalling it as needed?
@@MattMacarty i think he means putting all of your code in a function which inherits the stockticker. (like: def do_all_your_task_automatically(stockticker): your dokuments code) so you only need to enter the ticker and it does all these calculations.
I don't understand how you can just run a test to determine whether the distribution is normal or not? You are operating in an environment which is strictly fat tailed, always. There's can't be a normal distribution , you're just missing that one black swan event that may have not happened yet?
So returns are mostly normal. You can try testing with a larger sample but since big moves are so infrequent you probably won't come to a different conclusion. The test is not saying the distribution of returns is normal. It's saying we don't how enough evidence to conclude it is NOT normal. By definition you can't really predict a "black swan" event. However we can guess most of those big events actually can be somewhat predicted around earnings. You still don't know how big or what direction.
Dude, your material is easy to grasp and well done, thank you for your efforts!
I appreciate that! Glad it helped.
Thanks!
Thanks very much. Glad it helped
Thank you for the tutorial! There is lots to learn from this video!
Thanks. Glad it helped
this stuff is gold, thank you so much
Thanks. Glad it helped
You are a great teacher. Thank you for sharing your knowledge!
Thank you. Glad it helped.
@@MattMacarty Can you explain exactly because I don't understand , And thank you for this video
In the 'Fit linear model' section, I can't seem to find what lr was defined as.
Help appreciated! Thanks in advance
Hi. The cell with np.linalg... should start with lr = np.linalg... Probably it works in the video because I must have run the code earlier and the lr variable was still in memory
Awesome !!!
Glad it helped
Why are you doing a log for calculating the return?
You can get to the same place using either method of calculating change, with slightly different formulations, but in Finance since you are often comparing different asset classes and many compound continuously, we use a continuously compounding formulation. It does make discounting cashflows a little cleaner and is widely used in applications such as pricing options and VaR.
@@MattMacarty thx
for plotting the series whats the reason to use 252
This is the number of trading days in a typical year
Thanks for video
Glad it helped
do you have tutorial on how to get data on yahoo finance ?
Let me see what I can do
please do share, I'm having trouble importing the dataset
@@MattMacarty
Any video available Excel based price calculation and prediction?
HI, it depends on what you are trying to do, but you can try these:
th-cam.com/video/r67_YRtYcR8/w-d-xo.html
th-cam.com/video/Q5Fw2IRMjPQ/w-d-xo.html
@@MattMacarty Thanks for the reply. This sheet work in the Asian market especially the Indian market?
Nice video, thank you!
How can we create a new row for the prediction of the next day at point 15?
So DataFrames and Arrays aren't really designed to "add rows". Proabably the best way will be to dimension the Frame or array with an extra empty row that can be then populated with your forecast. Usually you just output the forecast separately.
@@MattMacarty yes it's ez , Thanks for everything
I am getting error as "string indices must be integers".
I exactly copied ur code
I think this is the notebook: github.com/mjmacarty/alphavantage/blob/main/4-quant_analysis.ipynb
Thank you.
Glad it helped
Is it possible to have the stock symbol as a variable to quickly switch between symbols
For sure. If we can think of it, we can do it. But how do you mean? Like a side-by-side comparison? Or maybe saving the data and recalling it as needed?
@@MattMacarty i think he means putting all of your code in a function which inherits the stockticker.
(like:
def do_all_your_task_automatically(stockticker):
your dokuments code)
so you only need to enter the ticker and it does all these calculations.
Could you please tell us how to download forex data?
Either from your broker, or from a data provider like EODHistoricalData
Good day..when i try to predict the "lr" table it says lr is not defined, please how do I fix this
Hi, probably the easiest thing top do here is download the notebook I used:
alphabench.com/data/pandas-quantitative-analysis-tutorial.html
@@MattMacarty Thanks a lot, was able to get the predict table after taking a look at the notebook.
There are missing items in the code in the videos
Hi. But sure what this could be, but you can download the notebook from GitHub
I don't understand how you can just run a test to determine whether the distribution is normal or not? You are operating in an environment which is strictly fat tailed, always. There's can't be a normal distribution , you're just missing that one black swan event that may have not happened yet?
So returns are mostly normal. You can try testing with a larger sample but since big moves are so infrequent you probably won't come to a different conclusion. The test is not saying the distribution of returns is normal. It's saying we don't how enough evidence to conclude it is NOT normal. By definition you can't really predict a "black swan" event. However we can guess most of those big events actually can be somewhat predicted around earnings. You still don't know how big or what direction.
hey guys if the yahoo api doesn't work try using the yfinance or fred
You can also try updating pandas_datareader: pip install --upgrade pandas-datareader