Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Backtesting.py - Intraday ORB Strategy in Python - Part 2

Part Time Larry via YouTube

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Learn to implement an intraday Opening Range Breakout (ORB) trading strategy using the Backtesting.py library in Python through this comprehensive 30-minute tutorial. Begin with a review of Part 1 concepts before diving into calculating opening ranges and verifying code correctness. Master entry signals, position sizing techniques, and order placement while understanding critical concepts like lookahead bias in backtesting frameworks. Explore both fixed and dynamic position sizing methods, implement take profit and stop loss calculations, and configure end-of-day liquidation parameters. Handle practical considerations including margin requirements, commission fees, and market holidays through coding solutions. Analyze backtest results and performance statistics, compare outcomes with paper trading data, and export results to CSV format for further analysis. Conclude with an evaluation of Backtesting.py's strengths and limitations as a backtesting framework, plus discussion of additional trading research papers and strategies worth exploring.

Syllabus

0:00 Review / Recap of Part 1
2:25 Getting the code / mailing list
3:31 Calculating the Opening Range
10:53 Verifying Correctness
11:47 Entries, Position Sizing, and Order Placement
13:39 Fixed Sized Order Placement in Backtesting.py, Lookahead Bias
15:36 First Run Stats / Performance
16:59 Dynamic Position Sizing, Take Profit Calculation
19:56 Stop Loss Calculation
20:45 End of Day Liquidation, Margin, Commission / Fees Parameters
22:55 Early Close Dates / Holidays Ugly Hack
23:49 Backtest Results
25:09 Comparing Trade Results to Paper, CSV Output
27:33 Backtesting.py First Impressions, Strengths, Limitations
28:45 "Stocks in Play" Paper? Other Papers I Should Look at?

Taught by

Part Time Larry

Reviews

Start your review of Backtesting.py - Intraday ORB Strategy in Python - Part 2

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.