The Moving Average and Beyond
Traders often rely on moving averages to understand trends and make informed decisions. If you’re unfamiliar with moving averages, my colleague has covered them in detail in the Simple Moving Average recipe. However, today, we’ll explore a different angle: how stock prices react to specific events.Visualizing Price Movements
To analyze stock price changes, we’ll create time series plots, assigning distinct colors to each event. This approach makes it easier for users to observe whether stock prices increase or decrease following specific occurrences. Our case study revolves around a recent viral topic in Indonesia: the announcement of Starlink’s operational availability in the country.The Starlink Impact
While Starlink isn’t a direct competitor to all companies, its presence can indirectly affect related industries. Let’s focus on a few key players:- TLKM.JK (Telkom Indonesia): TLKM.JK provides internet services through brands like Indihome and Telkomsel Orbit. How will their stock price react to Starlink’s arrival?
- EXCL.JK (XL Axiata): EXCL.JK, known for XLHome, faces competition from Starlink. Will their stock price be impacted?
- ISAT.JK (Indosat Ooredoo): ISAT.JK offers Indosat HIFI services. How will they fare in the wake of Starlink’s announcement?
- KLBV.JK (First Media): KLBV.JK, associated with FirstMedia, is another player in the field. What changes will they experience?
The Timeline
Our analysis begins with the first rumors of Starlink’s availability in Indonesia on early May 2024. We’ll then examine stock price movements following the official announcement by the Indonesian government and Elon Musk during an event in Bali on May 19, 2024.Data Fetching
Before diving into data fetching and processing, we’ll start by importing the necessary packages for this recipe. The libraries listed below are the ones we’ll be using. If you haven’t already installed them, make sure to do so before proceeding!symbol | date | close | volume | market_cap |
---|---|---|---|---|
TLKM.JK | 2024-04-01 | 3510 | 248116300 | 347708338470912 |
TLKM.JK | 2024-04-02 | 3490 | 233071700 | 345727083479040 |
TLKM.JK | 2024-04-03 | 3420 | 1502657000 | 338792724561920 |
TLKM.JK | 2024-04-04 | 3450 | 205184000 | 348760504795136 |
TLKM.JK | 2024-04-05 | 3460 | 116057100 | 339783352057856 |
Data Visualization
In our Python series, we’ve explored various plotting libraries, with Altair taking center stage. However, today, we’ll diving into the world of Matplotlib in this recipe. Before you ask, there’s no definitive winner between these two packages—it’s all about personal preference and the results you seek. Below, you’ll find the code snippet to create a line or time series plot for TLKM.JK using Matplotlib. Feel free to experiment and compare the results!
