UAPI = 100 * exp( Cum( log( Factor ) ) );

 Johan





--- In [email protected], "personal592002" 
<[EMAIL PROTECTED]> wrote:
>
> How to code Unweighted Arithmetic Price Index using ATC?
> I am stuck. I can export/import to/from Excel but was hoping 
someone 
> could suggest an easier way.  
> 
> /*Unweighted Arithmetic Price Index
> http://www.valueline.com/news/vlv030328x.html*/
> 
> AddToComposite( C/Ref(C,-1), "~UPI", "X", flags = 1 ) ;
> AddToComposite( 1, "~UPI", "I" );
> Buy = 0; 
> Factor = Foreign("~UPI","C") / Foreign("~UPI","I");
> 
> // needs PRODUCT function like in Excel not Cum() 
> UAPI =  100 * Cum(Factor); 
> 
> Plot(UAPI,"Unweighted Arithimetic Index",colorGreen,styleLine);
>


Reply via email to