π 2024-01-16 β Session: Enhanced Trading Strategy with Backtrader
π 00:00β23:55
π·οΈ Labels: Backtrader, Python, Trading, Data Visualization, Investment Strategy
π Project: Dev
β Priority: MEDIUM
Session Goal
The session focused on enhancing a trading strategy using the Backtrader framework, aiming to improve data processing, visualization, and strategy execution.
Key Activities
- Procedures for CNH Renewal: Reviewed the steps for renewing a driverβs license in PalhoΓ§a, SC, including required documents and scheduling.
- Investment Strategy Evaluation: Outlined a proposed investment strategy combining technical analysis and systematic trading rules.
- Data Processing Enhancements: Expanded Python code to include weekly data resampling using the yfinance library.
- Model Fitting Techniques: Discussed exponential model fitting for stock analysis and implemented a linear fit on log-transformed stock prices.
- [[Data Visualization]] Optimization: Optimized plotting of indicators in data visualizations to avoid redundancy.
- Backtrader Strategy Implementation: Modified the
OLSResiduals
indicator, adjusted theplotinfo
attribute, and implemented trading logic using thenext
method.
Achievements
- Developed a comprehensive framework for evaluating investment strategies.
- Enhanced data processing capabilities with weekly resampling.
- Improved visualization techniques in Backtrader, ensuring efficient plotting of indicators and observers.
Pending Tasks
- Further refine the trading strategy logic to optimize performance.
- Continue testing the modified
OLSResiduals
indicator for accuracy. - Evaluate the impact of the linear fit model on overall trading strategy performance.