Corporate actions are important events in stock market analysis because they can influence investor attention, liquidity, and trading activity. Events such as bonus shares and stock splits may become catalysts when they create changes in market perception and investor participation.
This project develops an IDX Corporate Action Radar using IDX API data to automatically collect, process, and evaluate corporate action events. The system identifies bonus share events, normalizes market calendar information, calculates catalyst scores, and generates a simplified trader dashboard.
The workflow consists of five main cells:
Cell 1: Import Library and API Configuration
Cell 2: Extract Corporate Action Data
Cell 3: Normalize Market Calendar
Cell 4: Corporate Action Scoring Engine
Cell 5: Simple Corporate Action Report
The system is developed using Python with Requests for API communication, Pandas for data processing, and JSON normalization for transforming IDX API responses into structured datasets. idx_corporate_action_radar_anal…
Cell 1 — Import Library and API Configuration
This cell prepares the Python environment and creates the IDX API connection. The get_api() function is used to retrieve market data from IDX endpoints and convert successful responses into JSON format. idx_corporate_action_radar_anal…
# ==========================================
# CELL 1 : IMPORT LIBRARY & API CONFIG
# ==========================================
import requests
import pandas as pd
import json
from datetime import datetime
API_KEY = "YOUR_API_KEY"
BASE_URL = "https://indonesia-stock-exchange-idx.p.rapidapi.com"
HEADERS = {
"x-rapidapi-host":
"indonesia-stock-exchange-idx.p.rapidapi.com",
"x-rapidapi-key":
API_KEY,
"Content-Type":
"application/json"
}
def get_api(endpoint):
url = BASE_URL + endpoint
response = requests.get(
url,
headers=HEADERS
)
if response.status_code == 200:
return response.json()
else:
return {
"error":
response.text
}
print("IDX Calendar Analyzer Ready")Cell 2 — Extract Corporate Action Data
This cell extracts corporate action information from IDX API. The analysis focuses on bonus share and stock split events, which are processed into DataFrames for further analysis. idx_corporate_action_radar_anal…
# ==========================================
# CELL 2 : EXTRACT CORPORATE ACTION DATA
# ==========================================
# Example API response variables
bonus = get_api(
"/api/calendar/bonus"
)
split = get_api(
"/api/calendar/stocksplit"
)
df_bonus = pd.json_normalize(
bonus["data"]["data"]["bonus"]
)
df_split = pd.json_normalize(
split["data"]["data"]["stocksplit"]
)
print("BONUS DATA")
display(df_bonus.head())
print("STOCK SPLIT DATA")
display(df_split.head())Cell 3 — Normalized Market Calendar
This cell converts different corporate action datasets into a unified market calendar format.
The normalization process creates a simpler structure containing:
Event type
Raw event information
This allows different market events to be monitored in one table. idx_corporate_action_radar_anal…
# ==========================================
# CELL 3 : NORMALIZED MARKET CALENDAR
# ==========================================
def create_calendar(df,event):
result=[]
for _,row in df.iterrows():
item=row.to_dict()
result.append({
"Event":
event,
"Raw Data":
" | ".join(
[
f"{k}: {v}"
for k,v in item.items()
if str(v)!="nan"
]
)
})
return pd.DataFrame(result)
calendar = pd.concat(
[
create_calendar(
df_bonus,
"Bonus Dividend"
),
create_calendar(
df_split,
"Stock Split"
),
create_calendar(
df_economic,
"Economic Event"
)
]
)
display(calendar)Cell 4 — Corporate Action Scoring Engine
This cell evaluates corporate action impact using a catalyst scoring model.
The scoring logic:
Factor ≥ 2 → Score 10 → Very High Impact
Factor ≥ 1.3 → Score 8 → High Impact
Factor ≥ 1.1 → Score 6 → Medium Impact
Below 1.1 → Score 4 → Low Impact
The system also generates trading interpretation based on the score. idx_corporate_action_radar_anal…
# ==========================================
# CELL 4 : CORPORATE ACTION SCORING ENGINE
# ==========================================
analysis = []
for _, row in df_bonus.iterrows():
ticker = row["company_symbol"]
ratio = row["sahambonus_ratio"]
factor = float(
row["stocksplit_factor"]
)
# Catalyst Score
if factor >= 2:
catalyst = 10
impact = "VERY HIGH"
elif factor >= 1.3:
catalyst = 8
impact = "HIGH"
elif factor >= 1.1:
catalyst = 6
impact = "MEDIUM"
else:
catalyst = 4
impact = "LOW"
# Trading Interpretation
if catalyst >= 8:
view = (
"Monitor accumulation, "
"volume expansion, and breakout"
)
elif catalyst >= 6:
view = (
"Watch corporate action impact "
"and liquidity change"
)
else:
view = (
"Low catalyst, use as supporting factor"
)
analysis.append({
"Ticker":
ticker,
"Corporate Action":
"Bonus Share",
"Ratio":
ratio,
"Factor":
factor,
"Cum Date":
row["stocksplit_cumdate"],
"Ex Date":
row["stocksplit_exdate"],
"Payment Date":
row["stocksplit_paymentdate"],
"Catalyst Score":
catalyst,
"Impact":
impact,
"Trading View":
view
})
df_analysis = pd.DataFrame(
analysis
)
display(
df_analysis
.sort_values(
"Catalyst Score",
ascending=False
)
)Cell 5 — Simple Corporate Action Report
This cell creates a trader-friendly summary dashboard.
The output converts technical terminology into simpler information:
Stock Code
Corporate Action
Share Ratio
Last Purchase Date
Potential Score
Impact
Analysis View
idx_corporate_action_radar_anal…
result :

# ==========================================
# CELL 5 : SIMPLE CORPORATE ACTION REPORT
# ==========================================
report = df_analysis.copy()
report = report.rename(
columns={
"Ticker":
"Stock Code",
"Corporate Action":
"Corporate Action",
"Ratio":
"Share Ratio",
"Cum Date":
"Last Purchase Date",
"Catalyst Score":
"Potential Score",
"Impact":
"Impact",
"Trading View":
"Analysis View"
}
)
report["Impact"] = report["Impact"].replace({
"VERY HIGH":
"Very Attractive",
"HIGH":
"Attractive",
"MEDIUM":
"Monitor",
"LOW":
"Additional Information"
})
report["Analysis View"] = report["Analysis View"].replace({
"Monitor accumulation, volume expansion, and breakout":
"Monitor volume increase and investor buying interest",
"Watch corporate action impact and liquidity change":
"Monitor liquidity changes after corporate action",
"Low catalyst, use as supporting factor":
"Use only as additional information"
})
display(
report[
[
"Stock Code",
"Corporate Action",
"Share Ratio",
"Last Purchase Date",
"Potential Score",
"Impact",
"Analysis View"
]
]
.sort_values(
"Potential Score",
ascending=False
)
)Conclusion
This project successfully develops an IDX Corporate Action Radar using IDX API data to analyze corporate action events and identify potential market catalysts.
The system combines data extraction, market calendar normalization, catalyst scoring, and trader-oriented reporting into an automated workflow.
By converting corporate action information into catalyst scores and simplified interpretations, the system helps users monitor events such as bonus shares and stock splits more efficiently.
However, corporate actions should not be used as standalone trading signals. Additional confirmation using price trends, trading volume, liquidity changes, and broader market conditions remains necessary.
Overall, this IDX Corporate Action Radar demonstrates how API-based financial data processing can support automated corporate event monitoring and market intelligence analysis.
