<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Charaf ZGUIOUAR on Medium]]></title>
        <description><![CDATA[Stories by Charaf ZGUIOUAR on Medium]]></description>
        <link>https://medium.com/@zgcharaf?source=rss-764f0a926c34------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Gh1nP7pRF1fxaErcdPK-Xg.jpeg</url>
            <title>Stories by Charaf ZGUIOUAR on Medium</title>
            <link>https://medium.com/@zgcharaf?source=rss-764f0a926c34------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 16:39:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@zgcharaf/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What is it like to be a Parisian during the Olympics]]></title>
            <link>https://zgcharaf.medium.com/what-is-it-like-to-be-a-parisian-during-the-olympics-bfa83ddc7dd3?source=rss-764f0a926c34------2</link>
            <guid isPermaLink="false">https://medium.com/p/bfa83ddc7dd3</guid>
            <category><![CDATA[olympics]]></category>
            <category><![CDATA[photography]]></category>
            <category><![CDATA[travel]]></category>
            <category><![CDATA[france]]></category>
            <category><![CDATA[paris]]></category>
            <dc:creator><![CDATA[Charaf ZGUIOUAR]]></dc:creator>
            <pubDate>Mon, 12 Aug 2024 23:05:11 GMT</pubDate>
            <atom:updated>2024-08-12T23:05:11.211Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FY0ytZHbdEKXYzXKb1spSQ.jpeg" /><figcaption>Place de la Bastille</figcaption></figure><p>When we are not complaining about parisian summer rain or grisaille, you may find us complaining about the heat and how “inferanle” it is, or even how it is “le gros bordel dans les transports”. Setting the clichés aside, it is quite once in a lifetime opportunity to have the Olympic Games organized in your City, but that is depending on who you ask. A narrative started brewing throughout the year, that the city was going to be a huge mess, unnavigable by feet, or even on four wheels. All of this amplified by social media, I guess fear spreads faster than any other emotion in society, the city ended up</p><p>Everything ran smoothly, our Olympians brought home many medals, the public was exalted and left in awe in the fact of the out-of-this-world olympic perfomance of Léon Marchand, my guess is, the number new births carrying his name will increase in the coming years. People were smiling everywhere, It was a magical moment in history that we will recount to our children and grandchildren. Paris was shinning, France was shinning, the Olympic games bring out about something that transcends human languages, cultures, races, and bridges our differences. It’s all about values of dedication, sportsmanship and our common humanity. It was a much needed break for the country and frankly for the world.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MuzfRDmlQVXJRFDFdMCEUw.jpeg" /><figcaption>La seine</figcaption></figure><p>Reminders of what brings us together are always moments to stop to reflect and to think about our beliefs, and our opinions, and that is all for the better good. Iin a world where people spend more time on their telephones than with actual people, the shared experiences like the Olympics serve as powerful reminders of our collective spirit and capacity for connection. These events help us break away from digital isolation, enabling genuine moments of joy and unity that are celebrated across the globe. It’s these universal celebrations of human achievement that remind us of what we can accomplish together, beyond the screens and the solitude.</p><p>That is all I have to say, It was an immense joy, now It is time to reflect, to think and to look forward to the future with a little more optimism.</p><p>This passage will not be long, I will include pictures of Paris I took with my EOS2000D, I have doing some photography lately, therefore feel free to give any feedback.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PDIaxnK7Y4fMZN3KzjY8IQ.jpeg" /><figcaption>A rooftop view from Levalois-Perret</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UA1UPKWKde94-H3qUhqvwQ.jpeg" /><figcaption>Another view of la sein and Notre-Dame de Paris</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bfa83ddc7dd3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quantile Regression Random Forests]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://zgcharaf.medium.com/quantile-regression-random-forests-d3416538c712?source=rss-764f0a926c34------2"><img src="https://cdn-images-1.medium.com/max/833/1*AXDl2hYEjo6c5dMSpUYIsQ.png" width="833"></a></p><p class="medium-feed-snippet">On the 5th of august researchers at blackrock have published a paper named Quantile Regression using Random Forest Proximities on Arxiv, I&#x2026;</p><p class="medium-feed-link"><a href="https://zgcharaf.medium.com/quantile-regression-random-forests-d3416538c712?source=rss-764f0a926c34------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://zgcharaf.medium.com/quantile-regression-random-forests-d3416538c712?source=rss-764f0a926c34------2</link>
            <guid isPermaLink="false">https://medium.com/p/d3416538c712</guid>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[econometrics]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[quantitative-finance]]></category>
            <dc:creator><![CDATA[Charaf ZGUIOUAR]]></dc:creator>
            <pubDate>Sat, 10 Aug 2024 10:09:21 GMT</pubDate>
            <atom:updated>2024-08-10T14:00:30.560Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Fundamental probability problems #2]]></title>
            <link>https://zgcharaf.medium.com/fundamental-probability-problems-2-63ea92bdf514?source=rss-764f0a926c34------2</link>
            <guid isPermaLink="false">https://medium.com/p/63ea92bdf514</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[quantitative-finance]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[probability]]></category>
            <category><![CDATA[statistics]]></category>
            <dc:creator><![CDATA[Charaf ZGUIOUAR]]></dc:creator>
            <pubDate>Sat, 08 Jun 2024 17:53:14 GMT</pubDate>
            <atom:updated>2024-06-08T18:06:01.493Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*I6Q8oH8QxETe_lWjBRapYQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nciNIoP-PJ09HpxAksql6A.jpeg" /><figcaption>Page 1 of solution 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2rxul29zn75X78MEs_pfrQ.jpeg" /><figcaption>Page 2 of solution 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*sfGtT81I8aW75oe0zCUzPg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*df72wb2ljQQE1zoOGcaGkg.jpeg" /><figcaption>Page 1 of Solution 2</figcaption></figure><p>On every ticket we can either lost 2 dollars or win 68, that is 70–2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TItVcyRGG_t7kmg1VbCswQ.png" /><figcaption>Page 2 of solution 2</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*Z-VEtMPlQVfXnXYJFfnS2w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YIrly8CHWjvJRwEWHmZUuw.jpeg" /><figcaption>Page 1 of solution 3</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YH4mNs7fjsd5MvlRKNxQOQ.jpeg" /><figcaption>Page 2 of solution 3</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N0JhJwggPjh5BGqTY3jyCQ.jpeg" /><figcaption>Page 3 of solution 3</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63ea92bdf514" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fundamental probability problems #1]]></title>
            <link>https://zgcharaf.medium.com/fundamental-probability-problems-1-5346f0b7a385?source=rss-764f0a926c34------2</link>
            <guid isPermaLink="false">https://medium.com/p/5346f0b7a385</guid>
            <category><![CDATA[stochastic-process]]></category>
            <category><![CDATA[quantitative-finance]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[puzzles-and-games]]></category>
            <category><![CDATA[probability]]></category>
            <dc:creator><![CDATA[Charaf ZGUIOUAR]]></dc:creator>
            <pubDate>Sat, 08 Jun 2024 14:43:24 GMT</pubDate>
            <atom:updated>2024-06-08T14:43:24.503Z</atom:updated>
            <content:encoded><![CDATA[<p>The teaching approach in universities tends to be very linear: you start by mastering the basics and, once mastered, rarely revisit them. Although your brain assimilates the concepts, problem-solving is a skill that only sharpens with practice. When was the last time you went back to solve problem sets from your freshman math courses?</p><p>That’s precisely what I plan to do in this series, driven purely by the joy of it. There’s also a touch of nostalgia for these problem sets, though that’s secondary. It’s about rediscovering the excitement of being a beginner, faced with an endless sea of possibilities to explore.</p><p>The problems I’ll be solving come from my second-year introductory course in college probability theory. Revisiting these exercises will also help me to refine my understanding of basic probability theory and enhance my problem-solving skills.</p><p>Let’s start with exercise one :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*7EY1qzfxzQJivpMoMvcwkQ.png" /></figure><h3>Solution to #EX1:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wll4F3LiISSZviKnwYRDpg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*dOeepHCRzLbc0mMHeAWaxg.png" /></figure><h3>Solution to #EX2:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CcP6B03-BHcQzlpA-3XmLA.jpeg" /><figcaption>expressions*, I also refer to X as P sometimes given that it follows a poisson distribution</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rw8fqX59ZO0uVNdesB5hiw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*6-nI8chJhI1wdwrGm9cKdA.png" /></figure><p>Solution to #EX3</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7z4R1ID1H8GmyUszobc5FQ.jpeg" /></figure><p>Feel free to comment, feedback is always welcome.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5346f0b7a385" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stochastic Calculus: Applying Itô’s Lemma to solving finding SDEs]]></title>
            <link>https://zgcharaf.medium.com/stochastic-calculus-applying-it%C3%B4s-lemma-to-solving-finding-sdes-5947427fb3f0?source=rss-764f0a926c34------2</link>
            <guid isPermaLink="false">https://medium.com/p/5947427fb3f0</guid>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[quantitative-finance]]></category>
            <category><![CDATA[stochastic-modelling]]></category>
            <category><![CDATA[probability]]></category>
            <dc:creator><![CDATA[Charaf ZGUIOUAR]]></dc:creator>
            <pubDate>Tue, 04 Jun 2024 23:50:23 GMT</pubDate>
            <atom:updated>2024-06-08T13:10:28.682Z</atom:updated>
            <content:encoded><![CDATA[<h3>Stochastic Calculus: Applying Itô’s Lemma to finding SDEs [Part I]</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1vt0zU95D5G-uF96uXQYMA.png" /><figcaption><strong>Wt is a Brownian Motion (Weiner Process) and dWt is its increment, and W0 = 0</strong></figcaption></figure><p>The problems we will be solving in this articles, try to think about them first beforehand.</p><p>Before getting into solving these problems, let’s get certain aspects clear about what this article will be about :</p><ol><li>This is intended to provide the intuition behind the ito’s integral and its application.</li><li>This article assumes that you are familiar with what is a stochastic process and stochastic differential equations.</li></ol><p>ELI5 sections, from time to time whenever I feel that the concept is quite abstract, I will add an ELI5 with ilustrations and examples as to make the demo or the solution clearer.</p><h3>Properties of Brownian Motion</h3><ol><li>Definition: Brownian motion, 𝑊𝑡, is a stochastic process that satisfies the following properties:</li></ol><ul><li>𝑊0=0</li><li>𝑊𝑡​ has independent increments.</li><li>𝑊𝑡​ has normally distributed increments: 𝑊𝑡−𝑊𝑠∼𝑁(0,𝑡−𝑠) for 0 ≤ 𝑠 &lt;𝑡 .</li><li>𝑊𝑡​ has continuous paths.</li></ul><p>Increments: For any time <em>t</em> and small increment Δ𝑡, the increment Δ𝑊𝑡=𝑊(𝑡+Δ𝑡)−𝑊(𝑡) is normally distributed with mean 0 and variance Δ<em>t</em>: Δ𝑊𝑡∼𝑁(0,Δ𝑡)</p><h3><strong>Qudratic Variation</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*xz5wDosFq6kYIa4FgiZqwA.png" /><figcaption>A snapshot from the book Quantitative finance by Maria C. Mariani</figcaption></figure><blockquote><strong>Quadratic variation is a measure of the accumulated magnitude of the small fluctuations (increments) in a stochastic process.</strong></blockquote><p>For a stochastic process 𝑊𝑡, the quadratic variation over an interval [0,𝑇] is defined as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/367/1*mm1eLuVY93vNGT1_1TNwbQ.png" /><figcaption>where 0=𝑡0&lt;𝑡1&lt;⋯&lt;𝑡𝑛=𝑇 is a partition of the interval [0,𝑇] with max⁡(𝑡(i)−𝑡(𝑖−1))→0 as 𝑛→∞</figcaption></figure><p>For Brownian motion, the quadratic variation over [0,𝑇] is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/130/1*uBkI2Ynj67xYyd3SEZkRXQ.png" /></figure><h3>Derivation of (𝑑𝑊)² = dt</h3><p>To see why (𝑑𝑊)² = 𝑑𝑡, consider a small increment of time Δ𝑡. The increment Δ𝑊𝑡 over this interval is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/187/1*80fyF2YbhDmgzsm0N4Sdmw.png" /></figure><p>When we take the limit as Δ<em>t</em>→0, we consider <em>dWt</em>​ to be an infinitesimal increment of Brownian motion over an infinitesimal time interval 𝑑𝑡.</p><p>For an infinitesimal time interval <em>dt</em>, the increment <em>dWt</em>​ behaves similarly: 𝑑𝑊𝑡∼𝑁(0,𝑑𝑡).</p><p>The expectation of the square of this increment is: 𝐸[(𝑑𝑊𝑡)²] = 𝑑𝑡.</p><p>If we sum up the squared increments over a time interval [0,<em>T</em>], the quadratic variation property of Brownian motion gives us:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/198/1*mzsHzSG3HJ1nkIF0N_JmxQ.png" /></figure><p>Taking the limit as the partition gets finer, we get:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/1*fGiydS4UARvOJ4J8wuq0nA.png" /></figure><h3>Taylor Series Expansion and Stochastic Processes</h3><p>In a deterministic setting, a Taylor series expansion of a function:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*n4Eyb0xMz3kW1GMVVStLFA.png" /></figure><p>In a stochastic setting, the same Taylor expansion is applied initially, but with the recognition of the special property of Brownian motion:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*WhNDy7QKhKiMGRKYjhnDIQ.png" /></figure><h3>Applying the Rule of Thumb: (𝑑𝑊)²=𝑑𝑡</h3><p>To adapt the Taylor series for stochastic calculus, we use the fact that (𝑑𝑊)²=𝑑𝑡. This adjustment is necessary to accurately reflect the behavior of Brownian motion.</p><p>Thus, in the context of stochastic processes, the term (<em>dW</em>)² is replaced with <em>dt</em>. This leads to the proper formulation of Itô’s Lemma:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*pkw9D5q8p9CuSGtmGZEqwg.png" /></figure><h3>Itô’s Lemma</h3><p>Itô’s Lemma formalizes this approach and ensures that we correctly handle the stochastic nature of <em>Wt</em>​. The lemma states:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/337/1*J8Hh7ZgyIzUVyhNfTD3hHA.png" /></figure><p>For a function 𝐹(𝑡,𝑊𝑡), if 𝐹 does not explicitly depend on <em>t</em>, the lemma simplifies to:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/1*p7XaWDn53tuaZQ8wdVAl6Q.png" /></figure><h3>Solving Problem 1 in the set:</h3><p>Given the function:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/278/1*f5QC5bgJ1aW5OslVjNUS4w.png" /></figure><p>What we can notice firsthand is that y does not depend on time, that means one less derivative to calculate :</p><ol><li>First Partial Derivative with respect to 𝑊𝑡 :</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/166/1*_qv5xLv8cq7jJ_dO1yAZiQ.png" /></figure><p>2. Second Partial Derivative with respect to 𝑊t² :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/186/1*Zklvb52gaeUrKWtogaa_lw.png" /></figure><p>3. Itô’s Lemma for a function 𝑦(𝑡,𝑊𝑡) is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/355/1*6fWNd1mJVdGefdWwClSXGA.png" /></figure><p>Since 𝑦 does not explicitly depend on 𝑡<em>t</em>, the partial derivative with respect to 𝑡 is zero: ∂𝑦/∂𝑡=0; we substitute into ito’s lemma we obtain :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/325/1*Bd6pZPwaO0U0fWLp67m3gg.png" /></figure><p>Recall that 𝑦 = exp⁡(𝑊𝑡)</p><p>Since 𝑦=𝑓, we can rewrite the differential equation in the form 𝑑𝑓​:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/176/1*LQJNaVdkFdiemBE_hBtkzw.png" /></figure><p>Thus, the final SDE for <em>y</em>(<em>Wt</em>​)=exp(<em>Wt</em>​) is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/155/1*ArUrVFnhvDSemmjQ60v9nA.png" /></figure><h3>Solving Problem 2 in the set:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wD4VgoUTMAfew47VUywIEg.jpeg" /><figcaption>Solution to problem 2</figcaption></figure><h3>Solving Problem 3 in the set:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xUbJEUJePqoJ5lpQ4S47ag.jpeg" /><figcaption>Solution to problem 3</figcaption></figure><p>It’s 1:43 am, I will be publishing the answers for the last two elements later on. In the meantime, maybe you can think about them given what we learned and try to put the solution in the commentary.</p><p>References and sources :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/380/1*y-B3hSOMZG2JgE1A1NKGIQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5947427fb3f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Bienaymé–Galton–Watson (BGW) Trees [Part I]]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://zgcharaf.medium.com/introduction-to-bienaym%C3%A9-galton-watson-bgw-trees-part-i-158e4f4d1bb4?source=rss-764f0a926c34------2"><img src="https://cdn-images-1.medium.com/max/724/1*OVZQPezyPmqteGoSBcRz4A.png" width="724"></a></p><p class="medium-feed-snippet">The history of Bienaym&#xE9;&#x2013;Galton&#x2013;Watson (BGW) trees is an interesting one, with contributions from several mathematicians spread out over&#x2026;</p><p class="medium-feed-link"><a href="https://zgcharaf.medium.com/introduction-to-bienaym%C3%A9-galton-watson-bgw-trees-part-i-158e4f4d1bb4?source=rss-764f0a926c34------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://zgcharaf.medium.com/introduction-to-bienaym%C3%A9-galton-watson-bgw-trees-part-i-158e4f4d1bb4?source=rss-764f0a926c34------2</link>
            <guid isPermaLink="false">https://medium.com/p/158e4f4d1bb4</guid>
            <category><![CDATA[stochastic-process]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[quantitative-finance]]></category>
            <category><![CDATA[finance]]></category>
            <dc:creator><![CDATA[Charaf ZGUIOUAR]]></dc:creator>
            <pubDate>Mon, 20 May 2024 22:15:52 GMT</pubDate>
            <atom:updated>2024-05-20T22:23:26.864Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Can Sentiment and Similarity in Central Bank Statements Predict the Stock Market?]]></title>
            <link>https://zgcharaf.medium.com/can-sentiment-and-similarity-in-central-bank-statements-predict-the-stock-market-c9d03efc16a0?source=rss-764f0a926c34------2</link>
            <guid isPermaLink="false">https://medium.com/p/c9d03efc16a0</guid>
            <category><![CDATA[quantitative-finance]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[stock-market]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Charaf ZGUIOUAR]]></dc:creator>
            <pubDate>Tue, 14 May 2024 20:41:23 GMT</pubDate>
            <atom:updated>2024-05-14T20:47:23.526Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/556/1*2BU2aScLHJT0_r27INzYZQ.png" /><figcaption>Number of Interest changes over the years by intensity</figcaption></figure><p>When the Federal Reserve (FED) or the European Central Bank (ECB) gives out monetary policy announcements, the accompanying statements are meticulously analyzed for the slightest hints about future decisions. These statements often contain subtle cues about the central banks’ economic outlook and potential policy changes, making them critical to investors, economists, and policymakers worldwide.</p><p>Market participants dissect every word and phrase, looking for changes in language that might signal a shift in policy stance. For instance, terms like “patient” or “transitory” can significantly impact financial markets, influencing everything from stock prices to exchange rates. Understanding the sentiment and consistency of these statements over time can provide valuable insights into the central banks’ thinking and their likely future actions.Scrapping and preprocessing:</p><p>We have to collect the texts for all ECB monetary policy speeches given between June 9, 1998, and October 26, 2023. Given the interactive nature of the ECB website (which requires scrolling to load earlier statements), we opted to use Selenium, which allows interaction with the web page, in addition to BeautifulSoup for parsing the HTML of the web pages.</p><p>We configured a Chrome WebDriver to navigate and get the texts from every link on the page. This process involved iterating over each link, ensuring complete page load, and using BeautifulSoup to extract the essential content from the HTML source code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*v67IkJkZPJeA68AtA6P1cQ.png" /><figcaption>The Unnamed was dropped, do not worry :)</figcaption></figure><h3><strong>Text preprocessing:</strong></h3><p>Text from ECB monetary policy contains oftentimes a Q&amp;A section that does not interest us much in the context of our study, though it could contain valuable insights, an extension of this work could take that into account.</p><p>We drop the Q&amp;A section, stopwords, and punctuation. We end up with an array of tokens for each period from which we extract the stem of every word.</p><h3><strong>Similarity:</strong></h3><p>We are interested in measuring the similarity between ECB statement X at time t and at t+1. We resort the jaccard similarity function that operates over bigrams:</p><p>It counts the number of common words i.e at the intersection of the sets of words of two consecutive statement divided by the union of the two sets. Below is an illustration :</p><p>We are interested in measuring the similarity between ECB statement X at time t and at t+1. We use the Jaccard similarity function, which operates over bigrams. It counts the number of common bigrams (i.e., the intersection of the sets of bigrams from two consecutive statements) and divides this by the union of the two sets. Below is an illustration:</p><p>1. Tokenization into Bigrams:<br> — Statement at t: “The ECB will maintain interest rates.”<br> — Bigrams: {“The ECB”, “ECB will”, “will maintain”, “maintain interest”, “interest rates”}<br> — Statement at t+1: “The ECB will increase interest rates.”<br> — Bigrams: {“The ECB”, “ECB will”, “will increase”, “increase interest”, “interest rates”}</p><p>2. Intersection and Union:<br> — Intersection: {“The ECB”, “ECB will”, “interest rates”}<br> — Union: {“The ECB”, “ECB will”, “will maintain”, “maintain interest”, “will increase”, “increase interest”, “interest rates”}</p><p>3. Jaccard Similarity Calculation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/1*akA_MX4RYGDd7bCM5K0gRA.png" /></figure><p>This method helps in quantifying the consistency and changes in the wording of ECB monetary policy statements over time.</p><p>This yields a measure of similarity between ECB monetary policy statements over time, which we can visualize below.</p><p>We can observe noticeable drops in similarity in 2008, during the 2015 Greek debt crisis, following the COVID-19 pandemic, and after the Ukraine invasion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XzSAdrBGXCNW4N3WAv7iJQ.png" /></figure><h3>Scoring pessimism:</h3><p>While similarity is a great indicator of the consistency of the wording, we also need to measure the sentiment of the wording. Hence, we relied on two measures of negative sentiment. The first one was obtained using the Loughran-McDonald dictionary, where we match negative and positive words and then calculate the ratio (negative_words_count -positive_words_count) / total_number_of_words. This measure’s simplicity is criticizable, which is why we also used FinBERT to score the text. Though the scores resemble neuron spikes, the results are nuanced; they are either very close to one when the text is negative or zero otherwise.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xM_ClOw0iVjZgVt_ABBgOg.png" /><figcaption>The pessimism scores obtained using the Loughran-McDonald dictionary</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tXD8AOrnxlrdawspFGMCGg.png" /><figcaption>The pessimism scores obtained using FinBert</figcaption></figure><h3>Asset and macroeconomic data:</h3><p>We have used the EURO STOXX 50 index and calculated the cumulative abnormal returns (CAR). Our goal is to explain the CAR using macroeconomic variables such as GDP growth, changes in interest rates, and inflation, while also incorporating our pessimism and similarity scores to understand if they capture any of the variance in the CAR.</p><p>We regress the CAR on the pessimism score (calculated in two different ways), the Jaccard similarity, inflation, the output gap, and the change in interest rates.</p><h3>Results:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*JMmUq_w4vOvL88NF2vCQCw.png" /><figcaption>Pessimism score calculated using the <strong>Loughran-McDonald dictionary</strong></figcaption></figure><p>We see that pessimism alone does not significantly explain part of the variance. However, the interaction with the Jaccard similarity is significant at the 10% level.</p><p>When we consider the pessimism 6 weeks back from the previous monetary policy statement and its Jaccard similarity, Pessimism_shifted becomes significant at the 5% level with a positive coefficient of 0.0168 versus 0.2132 in model (15). With respect to the interaction_shifted in model (18), the coefficient is negative and significant at -0.0065 at the 10% level.</p><p>Our analysis reveals that pessimism alone does not significantly explain part of the variance in cumulative abnormal returns (CAR). However, the interaction between pessimism and Jaccard similarity is significant at the 10% level, indicating that the consistency of wording, when considered with pessimistic sentiment, has a notable impact.</p><p>When we account for pessimism 6 weeks prior to the previous monetary policy statement and its Jaccard similarity, the variable Pessimism_shifted becomes significant at the 5% level, with a positive coefficient of 0.0168 compared to 0.2132 in model (15). This suggests that past pessimism, combined with textual consistency, contributes to explaining the variance in CAR.</p><p>In conclusion, we showed the importance of considering both sentiment and textual similarity in understanding the impact of monetary policy statements on market reactions. The relationship between past pessimism and Jaccard similarity provides insights for predicting CAR. Different and better measures for sentiment and similarity between statements could be improve analyzing the effects of central bank communications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c9d03efc16a0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to copulas [part 3]: concordance measures and statistical inference with examples in R]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://zgcharaf.medium.com/introduction-to-copulas-part-3-concordance-measures-and-statistical-inference-with-examples-in-r-13a8f002fe5c?source=rss-764f0a926c34------2"><img src="https://cdn-images-1.medium.com/max/858/1*p3gzQnZRtv2QT_Qn5coG0g.png" width="858"></a></p><p class="medium-feed-snippet">Last time we said that we are going to cover concordance measures and statistical inference for copulas.</p><p class="medium-feed-link"><a href="https://zgcharaf.medium.com/introduction-to-copulas-part-3-concordance-measures-and-statistical-inference-with-examples-in-r-13a8f002fe5c?source=rss-764f0a926c34------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://zgcharaf.medium.com/introduction-to-copulas-part-3-concordance-measures-and-statistical-inference-with-examples-in-r-13a8f002fe5c?source=rss-764f0a926c34------2</link>
            <guid isPermaLink="false">https://medium.com/p/13a8f002fe5c</guid>
            <category><![CDATA[risk-management]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[quantitative-finance]]></category>
            <category><![CDATA[copula]]></category>
            <dc:creator><![CDATA[Charaf ZGUIOUAR]]></dc:creator>
            <pubDate>Mon, 13 May 2024 22:45:42 GMT</pubDate>
            <atom:updated>2024-05-15T19:52:22.761Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Introduction to copulas [part 2]]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://zgcharaf.medium.com/introduction-to-copulas-part-2-fee5ad271335?source=rss-764f0a926c34------2"><img src="https://cdn-images-1.medium.com/max/600/1*6PC6en5fqRnGSFwUxMJVTw.png" width="600"></a></p><p class="medium-feed-snippet">The Gumbel copula is a member of the Archimedean class of copulas and is particularly useful for modeling the dependence between variables&#x2026;</p><p class="medium-feed-link"><a href="https://zgcharaf.medium.com/introduction-to-copulas-part-2-fee5ad271335?source=rss-764f0a926c34------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://zgcharaf.medium.com/introduction-to-copulas-part-2-fee5ad271335?source=rss-764f0a926c34------2</link>
            <guid isPermaLink="false">https://medium.com/p/fee5ad271335</guid>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[risk-management]]></category>
            <category><![CDATA[quantitative-finance]]></category>
            <dc:creator><![CDATA[Charaf ZGUIOUAR]]></dc:creator>
            <pubDate>Mon, 13 May 2024 02:56:04 GMT</pubDate>
            <atom:updated>2024-05-14T11:07:33.734Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Introduction to copulas [ Part 1]]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://zgcharaf.medium.com/introduction-to-copulas-part-1-605fab1e8610?source=rss-764f0a926c34------2"><img src="https://cdn-images-1.medium.com/max/600/1*3wGIHGa4vcC_jbv3qal7cg.png" width="600"></a></p><p class="medium-feed-snippet">These are notes that I wrote while preparing for exams at Sorbonne University. This was meant to be a gentle introduction to Copulas.</p><p class="medium-feed-link"><a href="https://zgcharaf.medium.com/introduction-to-copulas-part-1-605fab1e8610?source=rss-764f0a926c34------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://zgcharaf.medium.com/introduction-to-copulas-part-1-605fab1e8610?source=rss-764f0a926c34------2</link>
            <guid isPermaLink="false">https://medium.com/p/605fab1e8610</guid>
            <category><![CDATA[quantitative-finance]]></category>
            <category><![CDATA[risk-management]]></category>
            <category><![CDATA[copula]]></category>
            <category><![CDATA[trading]]></category>
            <category><![CDATA[statistics]]></category>
            <dc:creator><![CDATA[Charaf ZGUIOUAR]]></dc:creator>
            <pubDate>Sun, 12 May 2024 23:19:20 GMT</pubDate>
            <atom:updated>2024-05-14T07:15:01.549Z</atom:updated>
        </item>
    </channel>
</rss>