0% found this document useful (0 votes)
15 views

Coding Round For 2centscapital

The document outlines an internship coding challenge with 3 optional tasks - creating an advanced technical analysis trading strategy using indicators, developing a machine learning model to predict stock prices and create a trading strategy, and optimizing a portfolio of stocks with constraints. Participants are instructed to backtest strategies, calculate performance metrics, and write summary reports.

Uploaded by

abhicod45
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Coding Round For 2centscapital

The document outlines an internship coding challenge with 3 optional tasks - creating an advanced technical analysis trading strategy using indicators, developing a machine learning model to predict stock prices and create a trading strategy, and optimizing a portfolio of stocks with constraints. Participants are instructed to backtest strategies, calculate performance metrics, and write summary reports.

Uploaded by

abhicod45
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Coding round for Internship program hosted by 2CentsCapital

Instructions:

• Task 1 is mandatory for all candidates.


• You are allowed to find solutions from internet
• You must add useful comments and documentation in your module
• Choose one additional task from Task 2 or Task 3.
• Do not use AI Tools
• Bonus Points for those who complete all 3 tasks
• Join the discord server https://discord.gg/p22a7rEFYF
• Join the github classroom to upload your code
https://classroom.github.com/a/8AhUb8jr

Task 1: Advanced Technical Analysis Strategy

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.

Task 3: Portfolio Optimization with Constraints

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.

You might also like