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

[amibroker] Re: Vector-based (variable) interest rate



PureBytes Links

Trading Reference Links

Fred / Tomasz,

I'm not finding that to be the case, at least with the limited money
market fund data that I have.

My approach so far is to take a Sell signal from the system as a Buy
of the fund.  When the fund is sold on a later bar, AFL thinks the
gain is zero. The money fund price is almost constant and there is no
yield income series for AFL to use to add value to the equity curve.

To work around this while looking for an update on suggestion #944,
I've tried to generate a simulated money fund series
with code below.  This seems to work except that, in the case of
weekly series, it produces an incorrect result around the September
2001 market interruption.  Any suggestions for improvement?

(OBTW:  Fred, I tried to email you weeks ago about IO and did not
succeed.  Any suggestions?)

Best,
Whitney
//////////////////////////////////////////////
/*
Money market fund simulator

Given a yield vector and a factor, produce a price series that
simulates bar-bar gains from purchasing a money
market fund and selling on some subsequent bar.



*/

function moneymarketfundsim( rate_decimal, scalar, biy ) // biy = bars
in year
{
local bar;
local bcm1; bcm1 = BarCount() - 1;
local bar_mul;
local mm_price;
bar_mul = ( ( scalar * rate_decimal ) / biy ) + 1;
mm_price = 0;
mm_price[0] = 1;
for( bar = 1; bar <= bcm1; bar++ )
{
  mm_price[bar] = mm_price[bar-1] * bar_mul[bar];
}
return mm_price;
}// function moneymarketfundsim

// test with explore
/*
// sym_commpaper_3m is weekly bars of 3-month commercial paper yield
rate_d = Foreign( sym_commpaper_3m, "close", fixup = 0 ) / 100;
scalar = 0.9; // simulate 90% of index yield
mmf = moneymarketfundsim( rate_d, scalar, 52 );
Plot( mmf, "mmkt", colorGreen, styleLine );
Filter = 1;
AddColumn( mmf, "mmf", 1.4 );
*/
//////////////////////////////////////////////


--- In amibroker@xxxxxxxxxxxxxxx, "Fred" <ftonetti@xxx> wrote:
>
> This is simple enough to do already by switching to a money market fund 
> on sells / covers.  As far as constant dollar or inflation related 
> results go this can be dealt with if desired using the available CPI 
> data which are available back at least as far as the 1800's.
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "whitneybroach" <WhitneyBroach@> 
> wrote:
> >
> > Your feedback is welcome about this suggestion for a vector-based
> > interest rate feature in AFL: 
> > <http://www.amibroker.com/feedback/view_bug.php?bug_id=944>.  The
> > longer the backtest or the more cash a system holds, the more
> > pertinent the difference in interest payments.
> > 
> > The suggestion doesn't mention this, but a related feature might be an
> > inflation vector as well for reporting real (vs nominal) test results.
> > 
> > Best regards,
> > Whitney
> >
>



------------------------------------

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL 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

*********************************
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/