dictionary - Run Rand() Excel function until desired outcome occurs -
i trying simulate values portfolio, , part of includes generating pairs of 1200 randomly generated numbers. skipping few steps, portfolio consisting of multiple paths set up. in order calculate continuously compounded return, terminal values of each path need positive, in turn depend on randomly generated numbers.
now question be, possible keep rand() function running, until of terminal values exhibit positive signs? or need manually click "calculate" until result want?
thank in advance.
there 3 approaches consider:
- use
=randbetween(0,1200)
instead ofrand
- multiply
rand
result -1 if negative - surround
rand
abs(...)
Comments
Post a Comment