Hi, guys I asked this question in Software but I think that might be the wrong forum; no takers. Hopefully this is the right forum. I'm trying to calculate an equity column for an automated trading system in a spreadsheet. Column G is the adjusted close (yahoo eod data), column K is my security position (+1 if I'm long, -1 if I'm short and 0 if I'm out) and column P is my equity. Row 99 is the day before row 100. My equity cell formula is P100 = @IF(P99<0, 0, P99*@IF(K99>-1, (G100/G99)^K99, 2-G100/G99)) I think the short-sell formula is wrong. Any ideas how I can correctly program the equity cell for a short-sell? I can almost see it, but not quite. Thanks in advance.