Placeholder Image

字幕表 動画を再生する

  • okay, Perfect in this lesson will continue to explore how Monte Carlo simulations can be applied in practice.

  • In particular, we will see how we can run a simulation when trying to predict the future stock price of a company.

  • There is a group of libraries and modules that could be imported when carrying out this task.

  • But the good news is you have already used all of them.

  • Besides the classical numb pie in pandas, we will need norm from Sai Pie and some specific Matt Plant live features.

  • Once again, the company we will use for our analysis will be P and G.

  • The timeframe under consideration reflects the past 10 years, starting from January the 1st 2007 We want to forecast P and G's future stock price in this exercise, so the first thing we'll do is estimate its historical log returns.

  • There is a second way to obtain simple or log arrhythmic returns, and we will discuss it in more detail in the notebook document attached to this video.

  • The method will apply here is called percent change and you must write percent underscore change open and close parentheses to obtain the simple returns from a provided data set.

  • We can create the formula for long returns by using numb pies, log and then type one, plus the simple returns extracted from our data.

  • And here's a table with P and G's Log returns.

  • Awesome in the first graf weaken C, P and G's price, which has been gradually growing during the past decade.

  • In the 2nd 1 we plant the log returns, not the price of P and G.

  • The picture tells us the returns are normally distributed and have a stable, mean great.

  • Now let's explore their mean and variance as we will need them for the calculation of the brownie in motion we talked about in our previous lecture.

  • Remember, we already know how to calculate, mean and variance, don't we?

  • After a few lines of code, we obtained these numbers.

  • So what are we going to do with them?

  • First, I'll compute the drift component we studied in our previous lecture.

  • It is the best approximation of future rates of return of the stock.

  • The formula to use here will be you, which equals the average long return minus half its variants.

  • All right, we obtained a tiny number and that need not scare you because we'll do this entire exercise without annual izing are indicators.

  • Why?

  • Because we will try to predict P and G's daily stock price good.

  • Next, we will create a variable called Esti Dev and we will assign to it the standard deviation of log returns.

  • We said the Brownie in motion comprises the son of the drift and standard deviation of adjusted by E to the power of our.

  • So we will use this block in the second part of the expression.

  • Okay, we've set up the first brownie in motion element in our simulation.

  • In the next lesson, we will create the second component and we'll show you how this would allow us to run a simulation about a firm's future stock price.

okay, Perfect in this lesson will continue to explore how Monte Carlo simulations can be applied in practice.

字幕と単語

ワンタップで英和辞典検索 単語をクリックすると、意味が表示されます

B1 中級

モンテカルロ:株価予想その1 (Monte Carlo: Forecasting Stock Prices Part I)

  • 1 1
    林宜悉 に公開 2021 年 01 月 14 日
動画の中の単語