Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
MACD and EMA Trend Strategy: A Full Algorithmic Backtest in Python
Play lesson

Algorithmic Trading With Python - MACD and EMA Trend Strategy: A Full Algorithmic Backtest in Python

4.0 (1)
28 learners

What you'll learn

This course includes

  • 27.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

In this video, we design and objectively backtest a MACD and EMA trend-following trading strategy using Python. The purpose of this video is not to showcase an over-optimized or unrealistic system, but to walk through the full algorithmic workflow: defining precise trading rules, coding the indicator logic, and evaluating its performance on historical Forex data with transaction costs included. The strategy is based on: Exponential Moving Average (EMA) to identify the market trend MACD histogram and signal line to detect retracements and time entries Strict trend alignment: long trades in uptrends, short trades in downtrends You’ll see why strategies that appear convincing in manual backtests can behave very differently when tested objectively, and how automated backtesting reduces human bias and allows thousands of trades to be evaluated reliably. Backtest results: Annual return: ~5.5% Sharpe ratio: ~1.45 Forex data with commissions included ╔═╦═╦═╦═╦═╦═╦═╦═╦═╦═╦═╦═╦═╦═╦═╦═╦═╦══╦═╦═╦══╦═╦═╦══╦═╦═╦ 🔗 Resources & Links: -------------------------------------- • 📚 My Algorithmic Trading Courses → https://codetradingcafe.com • 📘 My Book: “Algorithmic Trading with Python” → https://a.co/d/6woMBHt • 💻 Free Python Code (GitHub) → https://github.com/ZiadFrancis/MACD_EMA_Trend/blob/main/strategy.ipynb Happy learning, happy coding ☕ ╚═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩═╩ ⚠️ This video is educational and focuses on algorithmic trading, AI, and Machine Learning, not financial advice. If you enjoy algorithmic trading, Python backtesting, and systematic strategies, consider subscribing to CodeTradingCafe.

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere