πŸ“… 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 the plotinfo attribute, and implemented trading logic using the next 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.