Coding Round For 2centscapital
Coding Round For 2centscapital
Instructions:
Description:
• Create a strategy using multiple technical indicators (e.g., RSI, MACD, Bollinger
Bands). The strategy should be unique on your own and generate buy/sell signals
based on complex conditions involving these indicators.
Subtasks:
1. Collect daily historical data for 100 stocks over the last 5 years using yfinance.
2. Calculate Indicator Values for each stock.
3. Develop the buy/sell signal logic using a combination of the calculated indicators.
4. Implement a backtesting framework to simulate trades based on the strategy.
5. Calculate and record the returns for each trade.
6. Generate a performance report including key metrics (total returns, annualized
returns, Sharpe ratio, maximum drawdown) for each symbol and make a summary
sheet.
7. Visualize the buy/sell signals and resulting portfolio value over time.
8. Write a summary report detailing the strategy, implementation, and performance
results.
Task 2: Machine Learning-Based Trading Strategy
Description:
• Develop your own unique machine learning model to predict stock price
movements and create a trading strategy based on these predictions.
Subtasks:
1. Collect daily historical data and relevant financial metrics (e.g., PE ratio, earnings
data) for 100 stocks.
2. Create features using technical indicators, financial metrics, and historical prices.
3. Split the data into training and testing sets.
4. Train a machine learning model (e.g., Random Forest, LSTM) to predict the next
day's price movement.
5. Evaluate the model's performance using appropriate metrics (e.g., accuracy,
precision, recall).
6. Develop a trading strategy based on the model’s predictions.
7. Implement a backtesting framework to simulate trades based on the model’s
predictions.
8. Calculate and record the returns for each trade.
9. Generate a performance report including key metrics (total returns, annualized
returns, Sharpe ratio, maximum drawdown).
10. Write a summary report detailing the strategy, implementation, and performance
results.
Description:
• Optimize a portfolio of 100 stocks with constraints on risk, sector allocation, and
turnover.
Subtasks:
1. Collect historical price data for 100 stocks over the last 5 years and obtain sector
classification for each stock.
2. Calculate risk metrics for each stock (e.g., standard deviation of returns, Value at
Risk).
3. Create a covariance matrix to assess the correlation between the stocks.
4. Group stocks by sector and impose constraints on sector allocation (e.g., no more
than 20% in any sector).
5. Limit the portfolio turnover (e.g., no more than 10% rebalanced monthly) and
implement a mechanism to track turnover.
6. Use an optimization algorithm (e.g., mean-variance optimization) to maximize the
portfolio's returns while adhering to the constraints.
7. Backtest the optimized portfolio over the historical period.
8. Compare the optimized portfolio's performance against a benchmark index (e.g.,
S&P 500).
9. Calculate and record key performance metrics (total returns, annualized returns,
Sharpe ratio, maximum drawdown, sector allocation analysis).
10. Write a summary report detailing the optimization process, constraints,
implementation, and performance results.