Computational Finance: Lecture 3/14 (Option Pricing and Simulation in Python)

Поділитися
Вставка
  • Опубліковано 5 вер 2024

КОМЕНТАРІ • 62

  • @user-wc7em8kf9d
    @user-wc7em8kf9d 3 роки тому +2

    After seeing the videos, I ordered the book... amazing content ! Thanks for sharing.

    • @ComputationsInFinance
      @ComputationsInFinance  3 роки тому

      Hope you enjoy it! There are a number of topics, exercises and many Python/Matlab codes that you can find in the book. Enjoy the reading! Best, Lech

  • @mathematician1681
    @mathematician1681 2 роки тому +3

    thank you so much Professor! your materials and videos are real gems

    • @ComputationsInFinance
      @ComputationsInFinance  2 роки тому

      hello Raccoon, thanks for the feedbacl! Welcome to the channel. More content is on the way. Best wishes, Lech

  • @amineghattassi150
    @amineghattassi150 3 роки тому +1

    Very clear and instructive. Thank you for creating these videos.

  • @joeljoy5164
    @joeljoy5164 2 роки тому +1

    Thanks a lot prof for sharing the lectures.
    Will buy the book soon.

  • @nunumumu8451
    @nunumumu8451 Рік тому +2

    Hello again! I hope you are doing well. I am following the derivation and I think there is another typo this time in slide 17/34 at 1:09:04. Namely, at the bottom of the slide in the equation for dV the stochastic term under the Q measure is missing \frac{\partial V}{\partial S}. My proof is that I have used dV from slide 5/17 and converted it from P measure to Q measure using the measure transformation you showed us. I also understand that it doesn't affect the rest of the calculation because we are only looking at the condition where the drift part is equal to zero. Thanks for another great lesson!

    • @ComputationsInFinance
      @ComputationsInFinance  Рік тому +2

      hello nunu mumu, I have just check the derivations. They seem to be correct. After application of the Itos lemma to V we have: dV=dV/dt + dV/dS*dS+1/2d^2V/dS^2*(dS)^2, then after the substition of the dynamics of S(T) into dV and the application of the Itos lemma you will get the equation on the slides. Do you agree? Best wishes, Lech

    • @nunumumu8451
      @nunumumu8451 Рік тому +1

      ​@@ComputationsInFinance With a risk of sounding ignorant, I am still not convinced. I looked over my derivation again and cross checked it also with your book (version from 2020). If you look at equation (3.16), from your book, you will notice that there is a partial derivative w.r.t. the underlying stock price in the stochastic term. I can confirm that (3.16) is the same as what I get, thus I believe it to be correct. The same equation, for dV, in the bottom of slide 17/34 at 1:09:04 is missing this partial derivative in the stochastic term. Hope you find the feedback useful.
      Thanks again for great lectures and I am sure I will write more (about stuff I don't understand) in the comments on your other videos as I proceed with the course ;) Best regards, nunu

    • @ComputationsInFinance
      @ComputationsInFinance  Рік тому +1

      @@nunumumu8451 I just double-checked nunu munu, you are correct, there should be sigma*S(t)* dV/dS *dW(t) instead of sigma*S(t) *dW(t). Thanks a lot for letting me know. Well noticed. I will ensure that it will be fixed in the slides on GitHub. Best wishes, Lech

  • @shivanshuchauhan1180
    @shivanshuchauhan1180 3 роки тому +2

    Thanks a lot for creating these videos. These are really helpful :)

  • @abdalleyare8590
    @abdalleyare8590 2 роки тому +1

    I want to start soon BS Computational Finance to become trader and investor in financial markets

    • @ComputationsInFinance
      @ComputationsInFinance  2 роки тому +1

      I really hope this course will help you reach your goals! Regards, Lech

  • @nunumumu8451
    @nunumumu8451 Рік тому +1

    Great content. I am really enjoying following the course! There is a typo in the derivation of BS in the slide 7/34 at 30:37. In the row before the last there is a missing stock price, S, in the bracket and it should read \left( V - \frac{\partial V}{\partial S} S
    ight).

    • @ComputationsInFinance
      @ComputationsInFinance  Рік тому +2

      Yes, you are correct, I will update the slides and fix this typo. Thanks for the info! Best wishes, Lech

  • @parols1160
    @parols1160 2 роки тому +3

    Good evening Professor, first of all I really wanted to thank you for this excellent material. Your ability to explain quite complex concepts is admirable and enviable.
    I have a small doubt about the Feynman-Kac example (slide 23/34). Shouldn't the final solution be sigma^2(T - t) - x^2 (rather than + x^2)?
    My question comes from the identity for the variance of a r.v. X that reads E[X^2] = Var[X] - E[X]^2.

    • @ComputationsInFinance
      @ComputationsInFinance  2 роки тому +1

      hello Parols, I'm not sure whether you should go via VaR. If you have X = x + sigma *W(t), then in order to calculate E[X^2], you should simply take the square of X and then compute the expectation. Then you will arrive at x^2 (with plus). Hope it explains. Best, Lech

  • @saumitrabhaduri8943
    @saumitrabhaduri8943 11 місяців тому

    Sir please explain equation V(S,T) on page 24 from the last equation in page 23 - how discount rate and Q measures are coming in this equation.

  • @dmitrystikheev3384
    @dmitrystikheev3384 2 роки тому +2

    Professor, hope you are doing excellent! I have one question regarding the course. I have always been interested in derivatives and quantitative finance in particular. I read John Hull's book to grasp the big picture of the products first, and then headed towards smth more rigorous - ultimately decided to comprehend the second volume of stochastic calculus for finance by Shreve. After having worked in structured products I became interested in models designed for pricing the interest rate instruments, but could not find an exhaustive material in either of the books listed above. Now I am planning to read a book that is devoted completely to Libor and swap market models. However, even though the context of this book touches upon some practical elements, such as calibration and so on, I still believe that it will not suffice to map the book appropriately onto the practical framework. So my question is: Do you cover in detail those models in your financial engineering course? And if yes, do you spend at least some time to show the pricing procedure from scratch? (from extracting the data, constructing the implied forward curve and up to the pricing itself) Thank you for your response in advance! Your lectures is a piece of diamond. Wish you the best with what you are doing)

    • @ComputationsInFinance
      @ComputationsInFinance  2 роки тому +3

      Hello Dmitry,
      Thanks for your message. The content related to the interest rates, construction of yield curve, pricing using Libor Market Model is discussed in the follow up course titled "Financial Engineering course". The complete course is freely available on this channel. Please also note that the courses discussed in these lectures are based on the book "Mathematical Modeling and Computation in Finance" where all the python and matlab codes are freely available.
      I hope it clarifies, however if you have more questions you can always write to my private e-mail.
      Best, Lech

  • @saumitrabhaduri8943
    @saumitrabhaduri8943 11 місяців тому

    Thanks for the wonderful course. I am struggling with the derivation of the last equation on page 17 under the Q measure ( under P is clear). Please help me with the derivation and also the equation 5 on page 18.

  • @michielfenaux7598
    @michielfenaux7598 2 роки тому +1

    And another question... Is W under the Q measure a brownian motion? I understand that if mu=r it is, but if mu is different from r, W0 under Q is not 0 (I think...).

    • @ComputationsInFinance
      @ComputationsInFinance  2 роки тому +2

      Hello Michiel, Indeed, it is still a Brownian motion. Details on this you can find in the book, or the book of S. Shreve. Best regards, Lech

  • @user-ul5ee2nh2p
    @user-ul5ee2nh2p Рік тому +1

    Hello, Prof. Can you please explain why measure P is equal to measure Q. Please provide some explanation as I am not comfortable in equating both the measures

    • @ComputationsInFinance
      @ComputationsInFinance  Рік тому +1

      hello Vanshaj, They are not equal. Can you be more specific where you see them to be the same? P and Q measure are different and should not be mixed when dealing with pricing of derivatives. Best wishes, Lech

  • @michielfenaux7598
    @michielfenaux7598 2 роки тому +1

    Hi, thanks for these videos. When you say that dS/M = Fm dM + Fs dS + 0.5 Fss dS^2 + 0.5 Fmm dM^2 + 0.5 Fsm dS dM, I'm not sure where the 2 lasts terms come from. Does it make sense to apply Ito when deriving wrt M (since M is governed by a PDE and not a SDE)? It seems you are performing a Taylor expansion here (minute 59).

    • @ComputationsInFinance
      @ComputationsInFinance  2 роки тому +2

      hello Michiel, your welcome. In the derivations, I don't assume anything about M(t)- thus it can also be stochastic. I only consider M(t) to be deterministic in the last step. The reason why I keep it general is that later in this course and the book we also cover the stochastic interest rate course. Then you cannot assume a deterministic money savings account. I hope it clarifies. Best Regards, Lech

  • @Cs12789
    @Cs12789 2 роки тому +1

    Hello Professor, first of all I really wanted to thank you for this good content. I have a problem with the RN measure.So for example suppose 2 stocks with two differents returns say 10% and 20% and all the others variables remain the same for both of them so under the RN world the call options for both will be the same but at maturity we expecte that the pays out will be greater. How we can prove that is not correct?
    Thank you

    • @ComputationsInFinance
      @ComputationsInFinance  2 роки тому +1

      hello YF, welcome to the channel. Firstly, you assumed that "all the other variables remain the same" this means that the volatilities for both stocks are exactly the same, right? If you look at historical data, you often will see that higher returns (measured based on the historical data), will yield also higher risk, thus higher volatility. On the other hand, the returns 10% and 20% in your example, are historical returns, they don't say anything about the future, right? Option market, will assign probability of returns to each of the stocks. You are able to compute this probability based on option prices. In the book "Mathematical Modeling and Computation in Finance", in Section 4.3.3 I explain how to compute these probabilities using market data. I hope it explains! Best wishes, Lech

  • @saumitrabhaduri8943
    @saumitrabhaduri8943 11 місяців тому

    on page 22 , is W under Q measure?

  • @diceman3873
    @diceman3873 2 роки тому +1

    Hello Professor! I am curious about the interest rate r in the black-scholes model ? Is it the nominal rate or real rate? Thank you!

    • @ComputationsInFinance
      @ComputationsInFinance  2 роки тому +2

      Hello DiceMan, it is nominal. We only talk about real interest rates in the context of inflation products (it is covered in the Financial Engineering course). Everywhere else we have always nominal rates.

    • @diceman3873
      @diceman3873 2 роки тому

      @@ComputationsInFinance thank you professor!

  • @pinakibhattacharyya7853
    @pinakibhattacharyya7853 2 роки тому +1

    Apart from your book what are some other books you would suggest for self study that goes well with this course?

    • @ComputationsInFinance
      @ComputationsInFinance  2 роки тому +1

      hello Pinaki, everything depends on what you would like to focus on. Math, Coding, Computational aspects? Please let me know, I will try to give you more references. Best wishes, Lech

  • @dariotartigro8539
    @dariotartigro8539 3 роки тому +1

    Good morning Prof. At 1:04:14 those equation is the Gisarnov's Theorem, right?

    • @ComputationsInFinance
      @ComputationsInFinance  3 роки тому +1

      Correct! In the follow up course, that will start in about 2 weeks, I will spend the whole lecture on the measure transformation aspect.

  • @Vaggos16
    @Vaggos16 2 роки тому +1

    what exactly means dynamics of a portfolio or dynamics of an asset?

    • @ComputationsInFinance
      @ComputationsInFinance  2 роки тому +1

      hello Sahinidis, dynamics of an asset are typically associated with a stochastic realization of a stock or other financial asset.
      In finance, we model assets using stochastic differential equations (Ito's dynamics)- this is typically meant by "dynamics" .
      I hope it clarifies. Best, Lech

  • @santosreckz7203
    @santosreckz7203 2 роки тому +1

    Hello sir i am studying mechaincal engineering and i stumbled on your video regading fininacial engineering and it looks intresting. So far its intresting but it looks confusing to me, what books or youtube video can i watch to understand the basic. i can see there are Differential & PDE Equations on the videos but there are a little different from mechanical engineering.

    • @ComputationsInFinance
      @ComputationsInFinance  2 роки тому +2

      hello Santos, welcome to the channel. The courses covered in this channel are based on the book "Mathematical Modeling and Computation in Finance". There you will find a lot of basic examples and background materials + references. Have you look into the book already? If you have more questions please let me know. I'm willing to give you more references, if needed. Best wishes, Lech

    • @pinakibhattacharyya7853
      @pinakibhattacharyya7853 2 роки тому

      PDEs appearing in financial engineering are parabolic. The canonical example is the heat equation. Parabolic PDEs are simpler in comparison to Elliptic or Hyperbolic PDEs since they admit exact solution via Green's function techniques. What kind of PDEs do you encounter in Mechanical Engineering?

    • @ComputationsInFinance
      @ComputationsInFinance  2 роки тому +1

      @@pinakibhattacharyya7853 I'm not sure what answer do you expect. You have asked me about Mechanical Engineering PDEs? I'm only qualified to answer the questions regarding Financial Engineering. BTW. Your comment regarding Green's function is only partially correct. The exact solution is only available for the simples Financial Models. Once we consider more realistic dynamics of the underlying model the problem becomes often 2 dimensional for which the solution in closed form is not available.

    • @santosreckz7203
      @santosreckz7203 2 роки тому

      @@ComputationsInFinance I just got the book and I am looking forward to it. Also would this book help in making mathematical models or algo for trading forex and stocks?

    • @pinakibhattacharyya7853
      @pinakibhattacharyya7853 2 роки тому

      @@ComputationsInFinance Soory My reply was addressed to Santos. Thanks for correcting me on the limited applicability of the Green's function technique and throwing light on more advanced issues which I am still to learn.

  • @vipercity1
    @vipercity1 3 роки тому

    Hello 53:33 It's not clear how substitution of the expectation results in an alpha-squared term. If I substitute the expectation and assume mean = 0 and variance = 1, then I get EXP(alpha (t - s)/2), not EXP(alpha-squared (t - s)/2). Many thanks.

    • @ComputationsInFinance
      @ComputationsInFinance  3 роки тому +2

      hi. Thanks for the question: if you have a random variable alpha*W(t), then the E(alpha*W(t)) = 0 and Var(alpha*W(t))=alpha^2Var(W(t))=alpha^2*t. This the reason why you see alpha^2 in the expressions above. Does it answer your question?

    • @vipercity1
      @vipercity1 3 роки тому

      @@ComputationsInFinance Very helpful. Thank you.

  • @leonisvandenberg6157
    @leonisvandenberg6157 3 роки тому

    thank you very much for all your videos. I have a question: In 23:15 you apply Ito's lemma to the portfolio to get the dynamics of the portfolio, i.e., d/Pi_t = dV_t - \Delta dS_t. But how can we apply Ito's lemma to the portfolio \Pi?

    • @ComputationsInFinance
      @ComputationsInFinance  3 роки тому

      hello Ioanis, you start with Pi(t) = V(t) + Delta * S(t). Since on the RHS you have a linear expression you simply get dPi(t) = Delta * dS(t). It is a trivial case actually. Best regards, Lech

    • @leonisvandenberg6157
      @leonisvandenberg6157 3 роки тому

      @@ComputationsInFinance thank you for the quick reply.
      Doesn't we start with:
      Pi(t) = V(t) - Delta * S(t)
      then by ito's lemma, we get
      dPi(t) = dV(t) - Delta * dS(t) - S(t) * d Delta - dS(t)* d Delta
      But why are the last two terms equal to zero?

    • @leonisvandenberg6157
      @leonisvandenberg6157 3 роки тому

      In some textbooks, they start with a self financing portfolio, i.e., Pi = alpha S(t) + beta B(t), where B(t) is the risk-free asset, and then by the self-financing assumption, we have dPi = alpha *dS(t) + beta dB(t)
      (that means the change in portfolio value is due to changes in market conditions and not to either infusion or withdrawl of cash)
      But in "our" case: Pi(t) = V(t) - Delta * S(t), I'm not sure how the dynamics can be obtained. In some textbooks they argue that the stochastic part of the change in the option price is perfectly correlated with changes in the stock price, hence we get
      dPi(t) = V(t) - Delta * dS(t),
      But by an application of Ito, we get
      dPi(t) = dV(t) - Delta * dS(t) - S(t) * d Delta - dS(t)* d Delta
      thanks again for your reply, i really appreciate it

    • @ComputationsInFinance
      @ComputationsInFinance  3 роки тому

      @@leonisvandenberg6157 ​ Now I see your point. In the derivations, we assume indeed Delta to be a constant number (defined purely in terms of the asset value) while in your derivations you assumed that Delta is stochastic. There is a nice discussion on this problematic approach by N. Taleb "Three problems with Dynamic Hedging in Discrete Time" where he discusses, to some extent, this problem. I have also seen a nice article discussing the equivalence between the two approaches: stochastic vs. deterministic delta. Both approaches give the same final result. Once I find that article I will post it here. Best regards, Lech

    • @leonisvandenberg6157
      @leonisvandenberg6157 3 роки тому

      @@ComputationsInFinance thank you for your contribution. Ahhh it's really trivial. I get it know : )
      It is just an application of Ito's summe rule, i.e., so let us first denote Pi_(V_t) as the partial derivate w.r.t. V_t
      Then: Pi_(V_t) = 1 and similarly for Pi_(S_t) = -Delta
      And the second partial derivative is trivially zero, i.e., Pi_(V_t V_t) = 0, similarly for Pi_(S_t S_t) = 0 and also Pi_(V_t S_t) = 0.
      Ito's lemma for two variable is: df(X,Y) = f_X dX + f_Y dY + 0.5 f_(XX) dX^2 + 0.5 f_(YY) dY^2 + f_(XY)dXdY,
      Substituting now, we get: d(V_t - Delta S_t) = 1*dV_t - Delta * dS_t
      Did I understand it correctly?
      Thank you again for your answers.
      By the way, i have read your book and it is really highly recommended !

  • @rupeshpoudel3468
    @rupeshpoudel3468 2 роки тому

    slide 7/34, you have a S missing inside the bracket. after, "so:"

    • @ComputationsInFinance
      @ComputationsInFinance  2 роки тому

      Hi Rupesh, why you think so? The terms in the bracket are V and S*dV/dS. I don't see any S missing. Can you be more specific, why you think so? Best, Lech

  • @albertoz9534
    @albertoz9534 2 роки тому +1

    Hi, in the application of Ito’s lemma at 1:01:23 is it missing a 1/2 in the last term of the first equality?
    Many thanks

    • @ComputationsInFinance
      @ComputationsInFinance  2 роки тому +2

      hello Alberto, 1/2 terms are only by F_SS, F_MM but they are not by F_SM, this has to do with the fact that you will have F_SM and F_MS which sum up to 1. I hope it clarifies. Best, Lech