## Formulae to simulate earnings/losses of a volatile stock

okjhum
Posts: 21
Joined: Sat Apr 26, 2008 6:42 pm
Location: Sweden

### Formulae to simulate earnings/losses of a volatile stock

Maybe I used the wrong search words, but I couldn't find anything on this. Pls excuse non-native English; hope you can understand my question:

I would like some formulae to simulate what would happen with the long-term accumulated earnings or losses with a volatile stock if I say I want my worth of shares at each point in time to stay constant at e.g. \$10,000 plus/minus some suitable percentage, while the share price is going up and down.
Thus whenever the share rises above +x% I must sell off some, and when it falls below -y% I must buy some more, to make the total value stay roughly constant.
Including commission fees and capital gain tax, of course.

I guess this is similar to what S&P 500 uses to keep each stock at a roughly constant percentage, but I want a roughly constant value.

Surely, such calculations already exist, although I couldn't find them. To be honest, I think I should expect it to be better to just leave all the shares untouched for ten years or so. Or would indeed "constancy trading" be better in the long run? Whatever that may be, I'd still like to find the formulae for the beauty of formulae as such.
Windows 10: Apache OpenOffice v 4.1.9 (Build:9805) - Rev 561082130a (Date 2021-01-08 16:08)
FJCC
Moderator
Posts: 8514
Joined: Sat Nov 08, 2008 8:08 pm

### Re: stock calculations

There is no built in way to do such a calculation in Calc. It would be very complicated in order to account for different models of volatility, trading costs, tax laws, and trade thresholds.
I also do not see the point of the strategy. If you want the value of the investment to be constant, leave the money in cash. I am missing where the profit comes from.
Windows 10 and Linux Mint, since 2017
RusselB
Moderator
Posts: 6567
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

### Re: stock calculations

These calculations do exist, and they are used by stock brokers, but they are far from simple.
The financial functions in Calc can do this, but there is a lot of viability in working with stocks that Calc just isn't setup to handle.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
okjhum
Posts: 21
Joined: Sat Apr 26, 2008 6:42 pm
Location: Sweden

### Re: Stock calculations

Thanks for the answers. At least it's a relief to see that it's not just that I'm too dumb to find the algorithms by myself.
Windows 10: Apache OpenOffice v 4.1.9 (Build:9805) - Rev 561082130a (Date 2021-01-08 16:08)