Analyze my PDF in which I have done some analysis ...
创建于:2025年6月10日
创建于:2025年6月10日
This case study is a hands‑on time‑series analysis of Alphabet (GOOG) daily price data from 2004‑08‑19 through 2024‑12‑17.
It demonstrates a full workflow—from raw CSV ingestion to feature engineering, statistical profiling, resampling, and rich visualisation—implemented in a single Jupyter notebook.
Item | Details |
---|---|
Dataset | GoogleStockData2004To2024.csv (Kaggle download) |
Key libraries | pandas , numpy , matplotlib |
Notebook name | CaseStudy 02 : Google Stock Data Analysis |
Step | What Happens | Key Code / Output |
---|---|---|
Data prep | Convert Date column → datetime64 , set as index for fast slicing. | Enables queries like df.loc['2022'] |
Enrich features | Adds month_name , weekday_name , Quarter plus Daily, Log, % and Intraday returns. & | Creates four return metrics for later stats |
Data validity check | Confirms High ≥ Open/Close ≥ Low for every row—no anomalies found. | Data passes all rules |
Exploratory slicing | Examples: Independence‑Day snapshot across years, full‑year slices, partial indexing. | |
Visualisations | Single‑series plots (Open, Close, High, Low), 2×2 dashboard, and dynamic helper functions:<br>visualize_quarter_values() & visualize_year_quarter_values() for any column/quarter. , | |
Return statistics | display_return_stats() summarises mean, st‑dev, min, max, skew & kurtosis for each return measure. Example output: mean daily return ≈ 0.10 %, σ ≈ 1.9 %. | |
Comprehensive panel | plot_return_analysis() produces a 6‑panel figure (price path, daily/log returns, their distributions & 30‑day annualised volatility). | |
Resampling | Down‑sample to quarter/month/year means and up‑sample to 6‑hour intervals with spline interpolation. & | |
Smoothing & shift | Rolling window (10‑day) smoothing and shift() examples for lag features. |
visualize_quarter_values()
plots.git clone
/ download this repo.GoogleStockData2004To2024.csv
in ./Data
.pip install -r requirements.txt
(pandas ≥ 2.0, numpy, matplotlib).CaseStudy_02_Google_Stock_Data_Analysis.ipynb
.text│ ├── Data/ │ └── GoogleStockData2004To2024.csv ├── notebooks/ │ └── CaseStudy_02_Google_Stock_Data_Analysis.ipynb ├── README.md ← (this file) └── requirements.txt
TL;DR – The notebook cleanses 20 years of Google stock data, engineers multiple return metrics, validates price integrity, visualises behaviour across time scales, computes rich descriptive stats and demonstrates resampling, smoothing and shifting techniques—offering a solid launch‑pad for deeper financial modelling.