NexusFi: Find Your Edge


Home Menu

 





Linear Regression backtesting - Is it possible?


Discussion in Platforms and Indicators

Updated
    1. trending_up 4,506 views
    2. thumb_up 1 thanks given
    3. group 1 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
emanon
los angeles, California, USA
 
Posts: 8 since Aug 2014
Thanks Given: 2
Thanks Received: 1

Does anyone know if it's possible to backtest a strategy that uses Linear Regression with a lookback window of less than the entire chart?

I've played around with a linear regression channel found in the member area on the ami site for a bit, changing the way it's calculated etc, but it seems as if the backtests are not conducted bar by bar. Which would mean the channel does not move along and record buys and sells as it moves forward through the backtest data.

Is there a way to change or create this functionality?


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Daytrading to swingtrading
Traders Hideout
Czechia Live at 52.5% as England Rides 4-2 Wave to Co-Fa …
Prediction Markets & Event Contracts
Thanks Mike. Godspeed.
The Elite Circle
Warsh Drops Easing Bias, December Hike Now Above 50% -- …
Prediction Markets & Event Contracts
No book, only a stair: journaling fills where price move …
Cryptocurrency
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Want your NinjaTrader indicator created, free?
5 thanks
FootPrintV2 Chart for NT8
1 thanks
BERN ALGOS algo trading journal
1 thanks
Afternoon-close session
1 thanks
Franks Trading Journey
1 thanks
  #2 (permalink)
colion
Asheville, North Carolina
 
Posts: 24 since Sep 2010
Thanks Given: 1
Thanks Received: 15

What code are you using? Can you plot the strategy and see buy/sell arrows (not the channel at each bar)? If so, I don't see why backtest would not work. Have you tried starting with a simpler problem of backtesting a linear regression line? Any trouble doing that?


Reply With Quote
Thanked by:
  #3 (permalink)
emanon
los angeles, California, USA
 
Posts: 8 since Aug 2014
Thanks Given: 2
Thanks Received: 1



colion View Post
What code are you using? Can you plot the strategy and see buy/sell arrows (not the channel at each bar)? If so, I don't see why backtest would not work. Have you tried starting with a simpler problem of backtesting a linear regression line? Any trouble doing that?

Sorry about the very dumb question, I wasn't thinking correctly. Of course LR is backtestable, esp when plotted as a curve rather than a line.


Reply With Quote




Last Updated on August 18, 2014


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts