This RoboAdvisor application constructs a portfolio of 12 high-risk stocks by maximizing portfolio risk (standard deviation) and correlation. It emphasizes concentrated, undiversified investments by heavily weighting the riskiest stocks.
-
Stock Filtering: Filters stocks by:
- Trading volume (β₯ 200,000)
- Currency (USD)
- Minimum trading days (20 days/month)
-
Portfolio Construction:
- Selects 12 stocks with the highest correlation.
- Prioritizes riskier stocks by assigning higher weights.
-
Custom Correlation: Implements a tailored Pearsonβs correlation formula for multivariable evaluation.
-
Risk Optimization:
- Maximizes portfolio standard deviation for higher risk exposure.
- Assigns weights between 4.17% and 25% for each stock.
-
Visualization: Graphs portfolio performance and compares equal-weighted vs optimized portfolios.
- Input a CSV file of tickers (
Tickers-Copy1.csv
). - Ensure valid stocks meet these criteria:
- Traded in USD.
- Monthly average volume β₯ 200,000.
- Minimum 20 trading days per month.
- Start with the two most correlated stocks.
- Iteratively add the next most correlated stock until the portfolio contains 12 stocks.
- Heavily weight stocks with higher standard deviations.
- Maintain weights between 4.17% and 25%.
- Calculate portfolio standard deviation and correlation.
- Display portfolio performance over time.
- Prepare Your Input:
- Place the CSV file of tickers in the project directory (
Tickers-Copy1.csv
).
- Place the CSV file of tickers in the project directory (
- Run the Script:
- Execute the Python script to filter stocks, build the portfolio, and calculate optimal weights.
- Outputs:
- Final portfolio of 12 stocks with weights and expected values.
- Graph of portfolio performance over time.
The script generates a graph comparing equal-weighted and optimized portfolios, emphasizing the differences in performance and risk.
Standard deviation is a key measure of risk, reflecting the volatility of stock prices. This RoboAdvisor focuses on maximizing standard deviation and correlation, creating a high-risk, high-reward portfolio that benefits from repeated price patterns.