Monday, May 26, 2008

HP-calculator equation, financial investment

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).

I should add more from HP 200LX later.

Cheers,
[vps]

2 comments:

StVps said...

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

StVps 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)