Added additional CLI usage informations
This commit is contained in:
45
README.md
45
README.md
@@ -56,3 +56,48 @@ Resamples the extracted signals to a weekly frequency and performs quantitative
|
|||||||
Install the required quantitative stack:
|
Install the required quantitative stack:
|
||||||
```bash
|
```bash
|
||||||
pip install pytrends pandas numpy scikit-learn yfinance matplotlib
|
pip install pytrends pandas numpy scikit-learn yfinance matplotlib
|
||||||
|
```
|
||||||
|
|
||||||
|
### Command Line Interface (CLI) Usage
|
||||||
|
The script features a fully parameterized CLI. You can customize the geographic scope, validation benchmark, time horizons, Google properties, and the anchor term itself.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Display the full help menu and options
|
||||||
|
python google_trends_sentiment_prototype.py -h
|
||||||
|
```
|
||||||
|
|
||||||
|
### Advanced CLI Examples:
|
||||||
|
```bash
|
||||||
|
# 1. Standard global run validating against the MSCI World ETF (URTH)
|
||||||
|
python google_trends_sentiment_prototype.py --geo GLOBAL --ticker URTH
|
||||||
|
|
||||||
|
# 2. Localized analysis for Germany validating against the DAX over a specific 5-year period
|
||||||
|
python google_trends_sentiment_prototype.py --geo DE --ticker ^GDAXI --timeframe "today 5-y"
|
||||||
|
|
||||||
|
# 3. Target Google News specifically rather than general web search, disabling visual plots
|
||||||
|
python google_trends_sentiment_prototype.py --gprop news --no-plot
|
||||||
|
|
||||||
|
# 4. Change the anchor term to a custom high-volume baseline
|
||||||
|
python google_trends_sentiment_prototype.py --anchor "news" --ticker URTH
|
||||||
|
```
|
||||||
|
|
||||||
|
### Full CLI Arguments Reference:
|
||||||
|
**Flag**,**Type**,**Default**,**Description**
|
||||||
|
```bash
|
||||||
|
"-h, --help",Flag,-,Show the help message and exit.
|
||||||
|
--geo GEO,String,'GLOBAL',"Geographic region code (ISO 3166-1 alpha-2). E.g., 'US', 'DE'."
|
||||||
|
--ticker TICKER,String,None,"Yahoo Finance ticker symbol for validation (e.g., '^GSPC', 'URTH')."
|
||||||
|
--timeframe TIMEFRAME,String,'today 5-y',"Data duration. Supports 'today 12-m', 'today 5-y', or specific 'YYYY-MM-DD YYYY-MM-DD'."
|
||||||
|
--gprop GPROP,String,'' (Web),"Google property filter. Supports '' (Web Search), 'news', 'images', 'froogle', or 'youtube'."
|
||||||
|
--anchor ANCHOR,String,'weather',Reference term used to rescale and link multiple keyword batches together.
|
||||||
|
--no-plot,Flag,False,Disables visual plot generation (.png) and only serializes the computed CSV data.
|
||||||
|
```
|
||||||
|
|
||||||
|
### Generated Outputs
|
||||||
|
he pipeline structures and serializes its findings into the following artifacts (where <geo> represents your chosen region code):
|
||||||
|
|
||||||
|
- `trends_raw_<geo>.csv`: The compiled, raw Google Trends search intensities.
|
||||||
|
- `trends_features_<geo>.csv`: The engineered feature set post-Z-score transformation.
|
||||||
|
- `sentiment_data_<geo>.csv`: The final calculated Sentiment Spread and Macro PCA Factor.
|
||||||
|
- `sentiment_plot_<geo>.png` / `combined_sentiment_analysis_<geo>.png`: Visual correlation plots mapping the extracted sentiment against your chosen financial benchmark.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user