Tuesday, May 27, 2008

HP-calculator equation, financial investment formula

This equation is for quick calculation of buying/selling stocks.
IF(S(AMT) OR S(VOL): AMT-VOL*PRICE :
(VOL*PRICE-ABS(VOL*PRICE*COM%/100*(1+VAT%/100)))-TOTAL)
Input negative value either AMT or VOL to indicate buying.
Note that I use '*' and '/' for multiply and divide operators respectively (the calculator uses exact arithmatic symbols).
However, few weeks later I revised to this version:
TRADE: IF(S(AMT) OR S(VOL) OR S(PRICE): AMT-VOL*PRICE : VOL*PRICE*COM%/100*(1+TAX%/100)-FEE)
  • Assign formula's label.
  • Handle when price is queried.
  • Only calculate fee (commission + tax) instead of total. To get total, press: [AMT] [+ or -] [FEE (twice, first time it will beep)]

I should add more from HP 200LX later.

Cheers,
[vps]

2 comments:

Anonymous said...

"OR S(VOL)" is added to support inquiry: how much volume should I buy/sell at desired amount?

Anonymous said...

Revise to support both buy & sell transaction.

Previous version:
IF(S(AMT) OR S(VOL): AMT-VOL*PRICE : VOL*PRICE*(1+(COM%/100*(1+VAT%/100)))-TOTAL)