NexusFi: Find Your Edge


Home Menu

 





Linear Regression backtesting - Is it possible?


Discussion in Platforms and Indicators

Updated
    1. trending_up 4,444 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?
Iran Update May 8: Still Reviewing MOU, Demands Reparati …
Traders Hideout
Trump Lands in Beijing on CPI Day: Iran Peace Expires To …
Prediction Markets & Event Contracts
April Jobs Beat Flips Fed Hike Odds Past 52% for First T …
Traders Hideout
Day 96 Missiles Hit Kuwait and Bahrain: June 15 Peace at …
Prediction Markets & Event Contracts
Fabrication or Framework? Irans Denied MOU Explains the …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
8 thanks
Darmok and Jalad at Tanagra
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