[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Collaborative success on NORMSDIST(), here's the completed code.



PureBytes Links

Trading Reference Links

Sebastian, etc.,

There's a free newsletter from "Incredible Charts" which might be of
interest to anyone who hasn't stumbled across it yet.  The latest can
be viewed at:

http://www.incrediblecharts.com/free/trading_diary/trading_diary.htm

There are several nice charts relative to this subject, and some
commentary on the Wright Model:

"There is some evidence that the Wright model may understate the
probability of recession in a low interest rate environment (as at
present). The model emphasizes the nominal level of short-term
interest rates and ignores whether these rates are rising or falling.
It also does not adequately explain the behavior of the market during
the 1966 and 2001 recessions, when interest rates were low."


Wayne



--- In amibroker@xxxxxxxxxxxxxxx, "sebastiandanconia"
<sebastiandanconia@xxx> wrote:
>
> 
> Wayne, I use the Fed Funds data from here:
> 
>
http://www.federalreserve.gov/RELEASES/h15/data/Weekly_Wednesday_/H15_FF\
> _O.txt
>
<http://www.federalreserve.gov/RELEASES/h15/data/Weekly_Wednesday_/H15_F\
> F_O.txt>
> 
> and the ^TNX-^IRX  from Yahoo! for convenience more than anything else,
> but any data source that represents the T-bill, 10-Year Treasury and Fed
> Funds rates should work.  I think the model is pretty "robust" (not
> prone to minor data errors), and I used long EMAs to smooth it about
> like Wright did in his original research.
> 
> S.
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "wlandry01" <wlandry01@> wrote:
> >
> > Sebastian,
> >
> > Thanks for pulling this all together.
> >
> > Is the Fed Fund file in question the "Treasury Constant Maturities"
> > data file provided at the following address?
> >
> > http://www.federalreserve.gov/datadownload/Choose.aspx?rel=H.15
> >
> > Thanks,
> >
> >
> > Wayne
> >
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "sebastiandanconia"
> > sebastiandanconia@ wrote:
> > >
> > >
> > > The data inputs ^TNX and ^IRX can be pulled in from Yahoo! as normal
> > > symbols, but you will have to get weekly Fed Funds data (available
> for
> > > free online from the Federal Reserve, a Google search on Fed Funds
> > > historical data should get you there). Save as a csv. file and
> import
> > > into AB.
> > >
> > >
> > >
> > > Sebastian
> > >
> > >
> > >
> > > SetBarsRequired( 100000, 100000 );
> > >
> > > FedFunds=EMA(Foreign("^FedFundsWkly","C",1),12);
> > >
> > > TNX=EMA(Foreign("^TNX","C",1),60);
> > >
> > > IRX=EMA(Foreign("^IRX","C",1),60);
> > >
> > > Spread= TNX-IRX;
> > >
> > > x=-2.17-0.76*Spread+0.35*FedFunds;
> > >
> > > Tx=1/(1+0.2316419*x);
> > >
> > >
> >
>
HASx=1-(exp(-0.5*x^2)/sqrt(2*3.141592654))*(0.31938153*Tx-0.356563782*Tx\
> \
> > > ^2+1.781477937*Tx^3-1.821255978*Tx^4+1.330274429*Tx^5);
> > >
> > > function t(x)
> > >
> > > { return 1 / (1+0.2316419*x); }
> > >
> > > function HASpre(x)
> > >
> > > { return 1 - (exp(-0.5*x^2)/sqrt(2*3.141592654))*(0.31938153*t(x)-
> > >
> > > 0.356563782*t(x)^2+1.781477937*t(x)^3-1.821255978*t(x)
> > >
> > > ^4+1.330274429*t(x)^5); }
> > >
> > > function HAS(x)
> > >
> > > { return IIf(x<-6, 0, IIf(x>6, 1, IIf( x>0, HASpre(x), 1 - HASpre(-
> > >
> > > x)))) ; }
> > >
> > > Plot( HAS(x), "Trend line", colorBlue );
> > >
> >
>



Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.441 / Virus Database: 268.17.39/687 - Release Date: 2/14/2007 4:17 PM