{"id":216049,"date":"2024-12-06T12:18:43","date_gmt":"2024-12-06T17:18:43","guid":{"rendered":"https:\/\/ibkrcampus.com\/campus\/?p=216049"},"modified":"2024-12-06T12:18:35","modified_gmt":"2024-12-06T17:18:35","slug":"itos-lemma-applied-to-stock-trading","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/itos-lemma-applied-to-stock-trading\/","title":{"rendered":"Ito&#8217;s Lemma Applied to Stock Trading"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><em>The article &#8220;Ito&#8217;s Lemma Applied to Stock Trading&#8221; first appeared on <a href=\"https:\/\/blog.quantinsti.com\/itos-lemma-applied-stock-trading\/\">QuantInsti<\/a> blog.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is the second part of the two-part blog where we explore how Ito\u2019s Lemma extends traditional calculus to model the randomness in financial markets. Using real-world examples and Python code, we\u2019ll break down concepts like drift, volatility, and geometric Brownian motion, showing how they help us understand and model financial data, and we\u2019ll also have a sneak peek into how to use the same for trading in the markets.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the first part, we saw how classical calculus cannot be used for modeling stock prices, and in this part, we\u2019ll have an intuition of Ito\u2019s lemma and see how it can be used in the financial markets. Here\u2019s the link to part I, in case you haven\u2019t gone through it yet:&nbsp;<a href=\"https:\/\/blog.quantinsti.com\/itos-lemma-trading-concepts-guide\/\">https:\/\/blog.quantinsti.com\/itos-lemma-trading-concepts-guide\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This blog covers:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Pre-requisites<\/li>\n\n\n\n<li>Quick Recap<\/li>\n\n\n\n<li>Ito Calculus<\/li>\n\n\n\n<li>Ito&#8217;s Lemma Applied to Stock Prices<\/li>\n\n\n\n<li>Use Case &#8211; I of Ito&#8217;s Lemma<\/li>\n\n\n\n<li>Important Considerations<\/li>\n\n\n\n<li>Use Case &#8211; II of Ito&#8217;s Lemma<\/li>\n\n\n\n<li>Till Next Time<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"pre-requisites\">Pre-requisites<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You will be able to follow the article smoothly if you have elementary-level proficiency in:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Calculus<\/li>\n\n\n\n<li>Python coding<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"quick-recap\">Quick Recap<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In part I of this two-blog series, we learned the following topics:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>The chain rule<\/li>\n\n\n\n<li>Deterministic and stochastic processes<\/li>\n\n\n\n<li>Drift and volatility components of stock prices<\/li>\n\n\n\n<li>Weiner processes<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">In this part, we shall learn about Ito calculus and how it can be applied to the markets for trading.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ito-calculus\">Ito Calculus<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Remember &nbsp;from part I?&nbsp;<img decoding=\"async\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-22.jpg\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\">&nbsp;is why Ito came up with the calculus he did. In classical calculus, we work with functions. However, in finance, we frequently work with stochastic processes, where&nbsp;<img decoding=\"async\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-22.jpg\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\">&nbsp;represents stochasticity.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Rewriting the equations from part I:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The equation for chain rule:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"851\" height=\"141\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-1.jpg\" alt=\"\" class=\"wp-image-216052 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-1.jpg 851w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-1-700x116.jpg 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-1-300x50.jpg 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-1-768x127.jpg 768w\" data-sizes=\"(max-width: 851px) 100vw, 851px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 851px; aspect-ratio: 851\/141;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The equation for geometric Brownian motion (GBM):<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"862\" height=\"118\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-2.jpg\" alt=\"\" class=\"wp-image-216053 lazyload\" style=\"--smush-placeholder-width: 862px; aspect-ratio: 862\/118;width:862px;height:auto\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-2.jpg 862w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-2-700x96.jpg 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-2-300x41.jpg 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-2-768x105.jpg 768w\" data-sizes=\"(max-width: 862px) 100vw, 862px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Equation 2 is a differential equation. The presence of&nbsp;<img decoding=\"async\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-22.jpg\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\">&nbsp;makes the GBM a stochastic differential equation (SDE). &nbsp;What\u2019s so special about SDEs?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Remember the chain rule discussed in part I? That\u2019s only for deterministic variables. For SDEs, our chain rule is Ito\u2019s lemma!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s get down to business now.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ito-s-lemma-applied-to-stock-prices\">Ito&#8217;s Lemma Applied to Stock Prices<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The following equation is an expression of Ito\u2019s lemma:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"834\" height=\"128\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-3.jpg\" alt=\"\" class=\"wp-image-216054 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-3.jpg 834w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-3-700x107.jpg 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-3-300x46.jpg 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-3-768x118.jpg 768w\" data-sizes=\"(max-width: 834px) 100vw, 834px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 834px; aspect-ratio: 834\/128;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Here,<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">f(x) is a function which can be differentiated twice, and<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">S is a continuous process, having bounded variation<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What do we mean by bounded variation?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It simply means that the difference between St+1 and St, for any value of t, would never exceed a certain value. What this \u2018certain value\u2019 is, is not of much significance. What is significant is that the difference between two consecutive values of the process is finite.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Next question: <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What\u2019s&nbsp;<img decoding=\"async\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-4.jpg\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It\u2019s a notation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Of what?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A notation to denote a quadratic variation process.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What\u2019s that?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this blog, we won\u2019t get into the intuition of the quadratic variation. It would suffice to know that the quadratic variation of <img decoding=\"async\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-5.jpg\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\"> is as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"799\" height=\"87\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-6.jpg\" alt=\"\" class=\"wp-image-216059 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-6.jpg 799w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-6-700x76.jpg 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-6-300x33.jpg 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-6-768x84.jpg 768w\" data-sizes=\"(max-width: 799px) 100vw, 799px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 799px; aspect-ratio: 799\/87;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If St follows a Brownian motion, the derivative of its quadratic variation is:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"854\" height=\"118\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-7.jpg\" alt=\"\" class=\"wp-image-216060 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-7.jpg 854w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-7-700x97.jpg 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-7-300x41.jpg 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-7-768x106.jpg 768w\" data-sizes=\"(max-width: 854px) 100vw, 854px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 854px; aspect-ratio: 854\/118;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Substituting equation 4 in equation 3, we get:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"847\" height=\"127\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-8.jpg\" alt=\"\" class=\"wp-image-216062 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-8.jpg 847w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-8-700x105.jpg 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-8-300x45.jpg 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-8-768x115.jpg 768w\" data-sizes=\"(max-width: 847px) 100vw, 847px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 847px; aspect-ratio: 847\/127;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">How is this derived?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We can treat equation 5 as a Taylor series expansion till the second order. If you aren\u2019t familiar with it, don\u2019t worry; you can continue reading.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Still, what\u2019s the intuition? Here, f is a function of the process S, which itself is a function of time t. The change in f depends on:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>The first-order partial derivative of f with respect to S,<\/li>\n\n\n\n<li>The second-order partial derivative of f with respect to t,<\/li>\n\n\n\n<li>The square of the volatility \u03c3, and,<\/li>\n\n\n\n<li>The square of S.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">The last three are multiplied and then added to the first one.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We saw earlier that stock returns follow a Brownian motion, so stock prices follow a GBM. Hence, &nbsp;suppose we have a process Rt, which is equal to <img decoding=\"async\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-9.jpg\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If we take <img decoding=\"async\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-10.jpg\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\"> in the GBM SDE (equation 2), and if we use the expression for Ito\u2019s lemma (equation 3), we\u2019ll have:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"811\" height=\"113\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-11.jpg\" alt=\"\" class=\"wp-image-216067 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-11.jpg 811w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-11-700x98.jpg 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-11-300x42.jpg 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-11-768x107.jpg 768w\" data-sizes=\"(max-width: 811px) 100vw, 811px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 811px; aspect-ratio: 811\/113;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">and,<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"824\" height=\"137\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-12.jpg\" alt=\"\" class=\"wp-image-216068 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-12.jpg 824w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-12-700x116.jpg 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-12-300x50.jpg 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-12-768x128.jpg 768w\" data-sizes=\"(max-width: 824px) 100vw, 824px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 824px; aspect-ratio: 824\/137;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Since<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"861\" height=\"34\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-13.jpg\" alt=\"\" class=\"wp-image-216070 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-13.jpg 861w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-13-700x28.jpg 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-13-300x12.jpg 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-13-768x30.jpg 768w\" data-sizes=\"(max-width: 861px) 100vw, 861px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 861px; aspect-ratio: 861\/34;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">and<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"841\" height=\"40\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-14.jpg\" alt=\"\" class=\"wp-image-216072 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-14.jpg 841w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-14-700x33.jpg 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-14-300x14.jpg 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-14-768x37.jpg 768w\" data-sizes=\"(max-width: 841px) 100vw, 841px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 841px; aspect-ratio: 841\/40;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">(equation 4),<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">we can rewrite equation 7 as:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"825\" height=\"140\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-16.jpg\" alt=\"\" class=\"wp-image-216074 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-16.jpg 825w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-16-700x119.jpg 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-16-300x51.jpg 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-16-768x130.jpg 768w\" data-sizes=\"(max-width: 825px) 100vw, 825px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 825px; aspect-ratio: 825\/140;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Since the second term on the RHS doesn\u2019t depend on the LHS, we can use direct integration to solve equation 7:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"817\" height=\"138\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-17.jpg\" alt=\"\" class=\"wp-image-216075 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-17.jpg 817w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-17-700x118.jpg 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-17-300x51.jpg 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-17-768x130.jpg 768w\" data-sizes=\"(max-width: 817px) 100vw, 817px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 817px; aspect-ratio: 817\/138;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Since<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"831\" height=\"40\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-18.jpg\" alt=\"\" class=\"wp-image-216076 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-18.jpg 831w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-18-700x34.jpg 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-18-300x14.jpg 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-18-768x37.jpg 768w\" data-sizes=\"(max-width: 831px) 100vw, 831px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 831px; aspect-ratio: 831\/40;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Thus, equation 9 changes to:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"836\" height=\"119\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-19.jpg\" alt=\"\" class=\"wp-image-216077 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-19.jpg 836w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-19-700x100.jpg 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-19-300x43.jpg 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-19-768x109.jpg 768w\" data-sizes=\"(max-width: 836px) 100vw, 836px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 836px; aspect-ratio: 836\/119;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s understand what the equation means here. The stock price at time t = 0, when multiplied by this term:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"838\" height=\"123\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-20.jpg\" alt=\"\" class=\"wp-image-216078 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-20.jpg 838w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-20-700x103.jpg 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-20-300x44.jpg 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-20-768x113.jpg 768w\" data-sizes=\"(max-width: 838px) 100vw, 838px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 838px; aspect-ratio: 838\/123;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">would give the stock price at time t.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In equation 2, the drift component had just \u03bc, but in equation 10, we subtract \u03c32\/2 from \u03bc. Why so? Remember how we obtain \u03bc? By taking the mean of daily log returns, right?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Umm, no! As mentioned in part I, \u03bc is the average percentage drift (or returns), and NOT the logarithmic drift.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As we saw from the drift component and volatility component graphs, the close price isn\u2019t just the drift component, but also the volatility component added to it. Hence, we need to correct the drift to consider the volatility component as well. It is towards this correction that we subtract <img decoding=\"async\" data-src=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/12\/quantinsti-lemma-applied-stock-trading-21.jpg\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\">from \u03bc. The intuition here is that the arithmetic mean of a set of non-negative real numbers is greater than or equal to the geometric mean of the same set of numbers. The value of \u03bc before the correction is the arithmetic mean, and after the correction, it is close to the geometric mean. When taken on an annual basis, the geometric mean is the CAGR.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">How do we interpret equation 10? The current stock price is simply a function of the past stock price, the corrected drift, and the volatility.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">How do we use this in the markets? Let\u2019s see\u2026<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-use-case-i-of-ito-s-lemma\">Use Case &#8211; I of Ito&#8217;s Lemma<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong>&nbsp;The codes in this part are continued from part I, and the graphs and values obtained are as of October 18, 2024.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Calculating the daily percent returns\nmsft[\"Daily_Returns\"] = msft[\"Close\"].pct_change()\n\n# Calculating mean, standard deviation, and variance of daily percent returns\ndaily_mean = msft[\"Daily_Returns\"].mean()\ndaily_stdev = msft[\"Daily_Returns\"].std()\ndaily_var = daily_stdev**2\nprint(\"The mean of the daily percent returns = \" + str(np.round(daily_mean,5)))\nprint(\"The standard deviation of the daily percent returns = \" + str(np.round(daily_stdev,5)))\nprint(\"The variance of the daily percent returns = \" + str(np.round(daily_var,5)))<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/gist.github.com\/quantra-go-algo\/75ac5565e66274bea9fab9291ebc0370#file-daily_percent_returns-py\">Daily_percent_returns.py&nbsp;<\/a>hosted with \u2764 by&nbsp;<a href=\"https:\/\/github.com\/\">GitHub<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The mean of the daily percent returns = 0.00109 <br>The standard deviation of the daily percent returns = 0.01707 <br>The variance of the daily percent returns = 0.00029<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Calculating the daily compounded returns\ndaily_compounded_mean = (((msft[\"Close\"][-1]\/msft[\"Close\"][0])**(1\/len(msft)))-1)\nprint(\"Daily compounded returns = \" + str(np.round(daily_compounded_mean,8)))<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/gist.github.com\/quantra-go-algo\/d0be2517ff12e6824778308da48f7787#file-daily_compound_returns-py\">Daily_compound_returns.py&nbsp;<\/a>hosted with \u2764 by&nbsp;<a href=\"https:\/\/github.com\/\">GitHub<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Daily compounded returns = 0.00094878<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Calculating the correct daily percent returns\ncorrected_mean = (daily_mean - (daily_stdev**2)\/2)\nprint(\"Corrected daily percent returns = \" + str(np.round(corrected_mean,8)))<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/gist.github.com\/quantra-go-algo\/e6b1f7092a9f1d58a8b19817e7eaf184#file-correct_daily_percent_returns\">Correct_daily_percent_returns&nbsp;<\/a>hosted with \u2764 by&nbsp;<a href=\"https:\/\/github.com\/\">GitHub<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Corrected daily percent returns = 0.000949<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The arithmetic mean of the returns was initially&nbsp;<strong>0.00109<\/strong>, and the geometric mean (daily compounded returns) computes to&nbsp;<strong>0.00094878<\/strong>. After incorporating the drift correction, the arithmetic mean stood at&nbsp;<strong>0.000949<\/strong>. Quite close to the geometric mean!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">How do we use this for trading?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Suppose we wanna predict the range within which the price of Microsoft is likely to lie after, say, 42 trading days (2 calendar months) from now.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s seek refuge in Python again:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Calculating the convexity corrected drift (mean), variance, and standard deviation for 42 trading days\nmean_42 = (daily_mean - (daily_stdev**2)\/2 ) * 42\nvar_42 = daily_var * 42\nstdev_42 = np.sqrt(var_42)\nprint(\"Corrected drift for 42 days = \" + str(np.round(mean_42,8)))\nprint(\"Variance for 42 days = \" + str(np.round(var_42,8)))\nprint(\"Standard deviation for 42 days = \" + str(np.round(stdev_42,8)))<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/gist.github.com\/quantra-go-algo\/1ee25636dc0af2b2f4569dc14d801b87#file-convexing_corrected_drift-py\">Convexing_corrected_drift.py&nbsp;<\/a>hosted with \u2764 by&nbsp;<a href=\"https:\/\/github.com\/\">GitHub<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Corrected drift for 42 days = 0.03985788 <br>Variance for 42 days = 0.01223456 <br>Standard deviation for 42 days = 0.11060996<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Calculating the likely returns of Microsoft after 42 trading days\n\n# Lower and upper ranges of Microsoft returns after 42 days, with 95% likelihood\nlower_return_42 = mean_42 - 2 * stdev_42\nupper_return_42 = mean_42 + 2 * stdev_42\n\n# Lower and upper ranges of Microsoft prices after 42 days, with 95% likelihood\nlower_price_42 = msft[\"Close\"][-1] * np.exp(lower_return_42)\nupper_price_42 = msft[\"Close\"][-1] * np.exp(upper_return_42)\n\nprint(\"Price below which the stock isn't likely to trade with a 95% probability after 42 days = \" + str(np.round(lower_price_42,2)))\nprint(\"Price above which the stock isn't likely to trade with a 95% probability after 42 days = \" + str(np.round(upper_price_42,2)))<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/gist.github.com\/quantra-go-algo\/b695de34e0eb29c1aa40673a6a91ccab#file-likely_return_microsoft-py\">Likely_return_Microsoft.py&nbsp;<\/a>hosted with \u2764 by&nbsp;<a href=\"https:\/\/github.com\/\">GitHub<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Price below which the stock isn&#8217;t likely to trade with a 95% probability after 42 days = 347.6 <br>Price above which the stock isn&#8217;t likely to trade with a 95% probability after 42 days = 541.04<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We know with 95% confidence between which ranges the stock is likely to lie after 42 trading days from now! How do we trade this? Ways are many, but I\u2019ll share one specific method.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Downloading the option chain of Microsoft with expiry on the 20th of December 2024, two months from now\nmsft_optc = yf.Ticker(\"MSFT\").option_chain('2024-12-20')\n\n# Selecting the put with a strike of $345, and the call with strike of $545\n\nput_345 = msft_optc.puts[msft_optc.puts['strike'] == 345]\ncall_545 = msft_optc.calls[msft_optc.calls['strike'] == 545]\n\nprint(\"Put with strike 345:\\n\", put_345)\nprint(\"\\nCall with strike 545:\\n\", call_545)<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/gist.github.com\/quantra-go-algo\/50deeb9e49801b543c42917f82f44a6c#file-download_and_print-py\">Download_and_print.py&nbsp;<\/a>hosted with \u2764 by&nbsp;<a href=\"https:\/\/github.com\/\">GitHub<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Put with strike 345:\n          contractSymbol             lastTradeDate  strike  lastPrice  bid  \\\n44  MSFT241220P00345000 2024-10-17 19:44:37+00:00   345.0       1.53  0.0   \n\n    ask  change  percentChange  volume  openInterest  impliedVolatility  \\\n44  0.0     0.0            0.0     1.0             0           0.125009   \n\n    inTheMoney contractSize currency  \n44       False      REGULAR      USD  \n\nCall with strike 545:\n          contractSymbol             lastTradeDate  strike  lastPrice  bid  \\\n84  MSFT241220C00545000 2024-10-16 13:45:27+00:00   545.0       0.25  0.0   \n\n    ask  change  percentChange  volume  openInterest  impliedVolatility  \\\n84  0.0     0.0            0.0     169             0           0.125009   \n\n    inTheMoney contractSize currency  \n84       False      REGULAR      USD <\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We have chosen out-of-the-money strikes near the 95% confidence price range we obtained earlier.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This way, we can pocket around $1.53 + $0.25 (emboldened in the above output) = $1.78 per pair of stock options sold, if held till expiry. If we sell one lot each of these call and put option contracts, we can pocket $178, since the lot size is 100. And what\u2019s the assurance of us making this profit? 95%, right? Simplistically, yes, but let\u2019s move closer to reality now.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"important-considerations\">Important Considerations<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Assumption of Normality:<\/strong>&nbsp;We used mean +\/- 2 standard deviations and kept talking about 95% confidence. This works in a world where the stock returns are normally distributed. But in the real world, they are not! And more often than not, this deviation from a normal distribution works against us since people react faster to news of impending doom over news of euphoria.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Transaction Costs:<\/strong>&nbsp;We didn\u2019t consider the transaction costs, taxes, and implementation shortfalls.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Backtesting:<\/strong>&nbsp;We haven\u2019t backtested (and forward tested) whether the prices have historically lied (and would lie in the future) within the predicted price ranges.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Opportunity Costs:<\/strong>&nbsp;We also didn\u2019t consider the margin requirements and the opportunity costs, were we to deploy some margin amount in this strategy.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Volatility:<\/strong>&nbsp;Finally, we are trading volatility here, not the price. We\u2019ll end up pocketing the whole premium only if both the options expire worthless, i.e., out-of-the-money. But for that to happen, the volatility must be low until the expiry. We must account for the implied volatilities obtained in the previous code output. Oh, and by the way, how is this implied volatility calculated?<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"use-case-ii-of-ito-s-lemma\">Use Case &#8211; II of Ito&#8217;s Lemma<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">We calculate the implied volatility from the classic Black-ScholesMerton model for option pricing. And how did Fischer Black, Myron Scholes, and Robert Merton develop this model? They stood on the shoulders of Kiyoshi Ito!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"till-next-time\">Till Next Time<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">And this is where I bid au revoir! Do backtest the code and check whether it can predict the range of future prices with reasonable accuracy. You can also use mean +\/- 1 standard deviation in place of 2 standard deviation. The benefit? The range would be tighter, and you could pocket more premium. The flip side? The chances of being profitable get reduced to around 68%! You can also think of other ways how to capitalise on this prediction. Do let us know in the comments what you tried.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">References:<br><strong>Main Reference:<\/strong><br><a href=\"https:\/\/research.tilburguniversity.edu\/files\/51558907\/INTRODUCTION_TO_FINANCIAL_DERIVATIVES.pdf\">https:\/\/research.tilburguniversity.edu\/files\/51558907\/INTRODUCTION_TO_FINANCIAL_DERIVATIVES.pdf<\/a><br><strong>Auxiliary References:<\/strong><br>Wikipedia pages of Ito\u2019s lemma, Brownian motion, geometric Brownian motion, quadratic variation, and, AM-GM inequality<br>EPAT lectures on statistics and options trading<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this part, we shall learn about Ito calculus and how it can be applied to the markets for trading.<\/p>\n","protected":false},"author":1553,"featured_media":185549,"comment_status":"open","ping_status":"closed","sticky":true,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[339,343,349,338,341,9563],"tags":[806,18152,18151,595],"contributors-categories":[13654],"class_list":["post-216049","post","type-post","status-publish","format-standard","has-post-thumbnail","category-data-science","category-programing-languages","category-python-development","category-ibkr-quant-news","category-quant-development","category-options-quant","tag-data-science","tag-ito-calculus","tag-itos-lemma-algo-trading","tag-python","contributors-categories-quantinsti"],"pp_statuses_selecting_workflow":false,"pp_workflow_action":"current","pp_status_selection":"publish","acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v28.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Ito&#8217;s Lemma Applied to Stock Trading | IBKR Quant<\/title>\n<meta name=\"description\" content=\"In this part, we shall learn about Ito calculus and how it can be applied to the markets for trading.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/216049\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ito&#039;s Lemma Applied to Stock Trading\" \/>\n<meta property=\"og:description\" content=\"In this part, we shall learn about Ito calculus and how it can be applied to the markets for trading.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/itos-lemma-applied-to-stock-trading\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2024-12-06T17:18:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/Shutterstock_2231197849.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"563\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Mahavir A. Bhattacharya\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mahavir A. Bhattacharya\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t    \"@context\": \"https:\\\/\\\/schema.org\",\n\t    \"@graph\": [\n\t        {\n\t            \"@type\": \"NewsArticle\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/itos-lemma-applied-to-stock-trading\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/itos-lemma-applied-to-stock-trading\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Mahavir A. Bhattacharya\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/338f97d31ffff7f18b4c14903d39d1d3\"\n\t            },\n\t            \"headline\": \"Ito&#8217;s Lemma Applied to Stock Trading\",\n\t            \"datePublished\": \"2024-12-06T17:18:43+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/itos-lemma-applied-to-stock-trading\\\/\"\n\t            },\n\t            \"wordCount\": 1655,\n\t            \"commentCount\": 0,\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/itos-lemma-applied-to-stock-trading\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/02\\\/Shutterstock_2231197849.jpg\",\n\t            \"keywords\": [\n\t                \"Data Science\",\n\t                \"Ito Calculus\",\n\t                \"Ito's Lemma. Algo Trading\",\n\t                \"Python\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Data Science\",\n\t                \"Programming Languages\",\n\t                \"Python Development\",\n\t                \"Quant\",\n\t                \"Quant Development\",\n\t                \"Quant Options\"\n\t            ],\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"CommentAction\",\n\t                    \"name\": \"Comment\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/itos-lemma-applied-to-stock-trading\\\/#respond\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/itos-lemma-applied-to-stock-trading\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/itos-lemma-applied-to-stock-trading\\\/\",\n\t            \"name\": \"Ito's Lemma Applied to Stock Trading | IBKR Campus US\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\"\n\t            },\n\t            \"primaryImageOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/itos-lemma-applied-to-stock-trading\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/itos-lemma-applied-to-stock-trading\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/02\\\/Shutterstock_2231197849.jpg\",\n\t            \"datePublished\": \"2024-12-06T17:18:43+00:00\",\n\t            \"description\": \"In this part, we shall learn about Ito calculus and how it can be applied to the markets for trading.\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/itos-lemma-applied-to-stock-trading\\\/\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"ImageObject\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/itos-lemma-applied-to-stock-trading\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/02\\\/Shutterstock_2231197849.jpg\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/02\\\/Shutterstock_2231197849.jpg\",\n\t            \"width\": 1000,\n\t            \"height\": 563,\n\t            \"caption\": \"Trader Takes Large Bullish Position on IAA, Inc (Symbol: IAA) After Earnings\"\n\t        },\n\t        {\n\t            \"@type\": \"WebSite\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"name\": \"IBKR Campus US\",\n\t            \"description\": \"Financial Education from Interactive Brokers\",\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"SearchAction\",\n\t                    \"target\": {\n\t                        \"@type\": \"EntryPoint\",\n\t                        \"urlTemplate\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/?s={search_term_string}\"\n\t                    },\n\t                    \"query-input\": {\n\t                        \"@type\": \"PropertyValueSpecification\",\n\t                        \"valueRequired\": true,\n\t                        \"valueName\": \"search_term_string\"\n\t                    }\n\t                }\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"Organization\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\",\n\t            \"name\": \"Interactive Brokers\",\n\t            \"alternateName\": \"IBKR\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"logo\": {\n\t                \"@type\": \"ImageObject\",\n\t                \"inLanguage\": \"en-US\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\",\n\t                \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"width\": 669,\n\t                \"height\": 669,\n\t                \"caption\": \"Interactive Brokers\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\"\n\t            },\n\t            \"publishingPrinciples\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/about-ibkr-campus\\\/\",\n\t            \"ethicsPolicy\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/cyber-security-notice\\\/\"\n\t        },\n\t        {\n\t            \"@type\": \"Person\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/338f97d31ffff7f18b4c14903d39d1d3\",\n\t            \"name\": \"Mahavir A. Bhattacharya\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/mahavirbhattacharya\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Ito&#8217;s Lemma Applied to Stock Trading | IBKR Quant","description":"In this part, we shall learn about Ito calculus and how it can be applied to the markets for trading.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/216049\/","og_locale":"en_US","og_type":"article","og_title":"Ito's Lemma Applied to Stock Trading","og_description":"In this part, we shall learn about Ito calculus and how it can be applied to the markets for trading.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/itos-lemma-applied-to-stock-trading\/","og_site_name":"IBKR Campus US","article_published_time":"2024-12-06T17:18:43+00:00","og_image":[{"width":1000,"height":563,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/Shutterstock_2231197849.jpg","type":"image\/jpeg"}],"author":"Mahavir A. Bhattacharya","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Mahavir A. Bhattacharya","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/itos-lemma-applied-to-stock-trading\/#article","isPartOf":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/itos-lemma-applied-to-stock-trading\/"},"author":{"name":"Mahavir A. Bhattacharya","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/338f97d31ffff7f18b4c14903d39d1d3"},"headline":"Ito&#8217;s Lemma Applied to Stock Trading","datePublished":"2024-12-06T17:18:43+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/itos-lemma-applied-to-stock-trading\/"},"wordCount":1655,"commentCount":0,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/itos-lemma-applied-to-stock-trading\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/Shutterstock_2231197849.jpg","keywords":["Data Science","Ito Calculus","Ito's Lemma. Algo Trading","Python"],"articleSection":["Data Science","Programming Languages","Python Development","Quant","Quant Development","Quant Options"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/itos-lemma-applied-to-stock-trading\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/itos-lemma-applied-to-stock-trading\/","url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/itos-lemma-applied-to-stock-trading\/","name":"Ito's Lemma Applied to Stock Trading | IBKR Campus US","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/itos-lemma-applied-to-stock-trading\/#primaryimage"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/itos-lemma-applied-to-stock-trading\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/Shutterstock_2231197849.jpg","datePublished":"2024-12-06T17:18:43+00:00","description":"In this part, we shall learn about Ito calculus and how it can be applied to the markets for trading.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/itos-lemma-applied-to-stock-trading\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/itos-lemma-applied-to-stock-trading\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/Shutterstock_2231197849.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/Shutterstock_2231197849.jpg","width":1000,"height":563,"caption":"Trader Takes Large Bullish Position on IAA, Inc (Symbol: IAA) After Earnings"},{"@type":"WebSite","@id":"https:\/\/ibkrcampus.com\/campus\/#website","url":"https:\/\/ibkrcampus.com\/campus\/","name":"IBKR Campus US","description":"Financial Education from Interactive Brokers","publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ibkrcampus.com\/campus\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ibkrcampus.com\/campus\/#organization","name":"Interactive Brokers","alternateName":"IBKR","url":"https:\/\/ibkrcampus.com\/campus\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","width":669,"height":669,"caption":"Interactive Brokers"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/"},"publishingPrinciples":"https:\/\/www.interactivebrokers.com\/campus\/about-ibkr-campus\/","ethicsPolicy":"https:\/\/www.interactivebrokers.com\/campus\/cyber-security-notice\/"},{"@type":"Person","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/338f97d31ffff7f18b4c14903d39d1d3","name":"Mahavir A. Bhattacharya","url":"https:\/\/www.interactivebrokers.com\/campus\/author\/mahavirbhattacharya\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/Shutterstock_2231197849.jpg","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/216049","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/users\/1553"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=216049"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/216049\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/185549"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=216049"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=216049"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=216049"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=216049"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}