Hello Louis -
The clip I've attached is "way above my pay grade" of understanding, but it
sounds like you would like to fit a regression line, get the slope of
that line and measure the dispersion about the linear reg(least
squares) line.
Here's a chance
that the K-Ratio might do what you want, and what Lars Kestner says about
it.
(The K-ratio can be calculated
from a daily, weekly or monthly equity curve.) The
numerator of the K-ratio is the b1 coefficient estimate in the equity model. The
b1
estimate is the
ratio's proxy for return and is calculated by running an
ordinary least-squares regression on the equity model. The value of
bi is
also the slope of the least-squares trendline from the
equity curve. The higher the values of b1, the sharper the rise in
the equity curve is and the faster the system makes
money. Risk of the trading system is measured by the standard
error of b1, again calculated from linear regression techniques. The
standard error of b1 measures the efficiency of the equity model.
Higher standard errors indicate inconsistent performance; the model did not
explain daily equity values successfully. Lower standard
errors indicate stability in returns. Finally, the standard error of
b1 is multiplied
by the square root of the number of observations in the
equity curve. This normalizes the K-ratio to be comparable
across time frames (one year, five years, 10 years) and
periodicity of data (daily, weekly, monthly). Those more
familiar with statistics will recognize the K-ratio as
the t
-statistic of
b1
with a correction
factor for the number of observations. Stocks & Commodities V14:3 (115-118):
Measuring System Performance by Lars N. Kestner
From reading bits
and pieces of the notes, it doesn't sound like you want to apply it to the
equity curve but I think it would give and indication of what the price curve
was doing.
Hope this helps
Joe
----- Original Message -----
Sent: Friday, September 05, 2008 10:50
AM
Subject: Re: [amibroker] How to calculate
a slope % with Rsquared without a loop?
Hi again (sorry for all the messages), I forgot
something. I don't only want to get the % of a slope, but rather how
smooth it is. I want a smooth slope from a high point. Do you know how
to do this? Thanks, Louis
2008/9/4 Ara Kaloustian <ara1@xxxxxxxcom>
Try this:
HHV(Var,period); // find value
of highest high
HHVBars(Var,period); // Find number of
bars - distance from HHV to current bar
%slope = ((Highest high - currentclose) /
Highest high) / number of bars * 100;
You may choose to define slope in a different
way, but this is the basic structure
A
-----
Original Message -----
Sent:
Thursday, September 04, 2008 9:34 AM
Subject:
Re: [amibroker] How to calculate a slope % with Rsquared without a
loop?
Hi, Thanks for your response. I should have said
I want to calculate a slope from a high point; I'd like to get a smooth
slope from a HHV... How would you do that? Thanks a
lot! Louis
2008/9/4 Ara Kaloustian <ara1@xxxxxxxcom>
%slope = (variable - Ref(Variable,-x)
) / Ref(Variable,-x) * 100;
-----
Original Message -----
Sent:
Thursday, September 04, 2008 9:20 AM
Subject:
[amibroker] How to calculate a slope % with Rsquared without a
loop?
Hi,
I was wondering how to calculate the % of a
slope without doing any loop. Anybody has any
idea?
Thanks,
Louis
__._,_.___
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
__,_._,___
|