Country: Türkiye
You are in the Türkiye edition. Type your country to switch.
Nigeria
Europe
Loading every country…
No country matches. Check the spelling, or choose "Any country" for the Global edition.
You are learning in the Türkiye edition, with examples in lira and from Türkiye.
Your learning profile
Financial Data Lab · Lesson 5 of 8
Lab 5: cleaning corporate actions in code
This lab adjusts a raw price series for a share split and a dividend in Python, using an adjustment factor applied to every earlier price, then checks the result: no false jump on the split date and a total return that matches a hand calculation. It also handles a ticker change by mapping old and new symbols to one identifier.
This lesson is complete in writing. A video for it is on its way.
What you will learn
- By the end you can build adjustment factors for a share split, a bonus issue and a cash dividend.
- You can apply the factors in pandas to produce an adjusted close while keeping the raw prices unchanged.
- You can check the result: no false jump on the split date and returns that match a hand calculation.
- You can link a share's history through a ticker change using a permanent security identifier.
Key terms in this lesson
- Adjustment factor
- The number every earlier price is multiplied or divided by to remove the jump caused by a corporate action.
- Corporate action
- An event decided by a company that affects its shares, such as a dividend, bonus, rights issue or split.
- Security identifier
- A permanent code for a security that does not change when its ticker or name does, used to link price histories correctly through ticker changes.
- Step 1: A crash that never happened, not started
- Step 2: Building the adjustment factors, not started
- Step 3: Applying the factors in pandas, not started
- Step 4: Checking the adjusted series, not started
- Step 5: Ticker changes and permanent identifiers, not started
About 8 min of reading
Step 1 of 5
A crash that never happened
Opening this step…
Step 2 of 5
Building the adjustment factors
This step opens when you finish the one above.
Step 3 of 5
Applying the factors in pandas
This step opens when you finish the one above.
Step 4 of 5
Checking the adjusted series
This step opens when you finish the one above.
Step 5 of 5
Ticker changes and permanent identifiers
This step opens when you finish the one above.
Key takeaways
The key takeaways open when you finish every step.
Lesson quiz
6 questions. You need 85% to pass.
The quiz opens when you finish every step.
Read first
Stockertim Learn is education. It explains how investing works and never recommends buying or selling anything.
Popular this week: Basics: BeginnerTurkish markets: Beginner