ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Generating lognormal equity returns (https://www.excelbanter.com/excel-programming/390225-generating-lognormal-equity-returns.html)

Sheak1

Generating lognormal equity returns
 
Would anyone have any sample code that I can use to generate a random series
of monthly lognormal equity returns with a mean of, let's say, 8% annually
and a standard deviation of 15%. Many thanks.

Gary''s Student

Generating lognormal equity returns
 
use the
=LOGNORMDIST() function in the worksheet
--
Gary''s Student - gsnu200725


"Sheak1" wrote:

Would anyone have any sample code that I can use to generate a random series
of monthly lognormal equity returns with a mean of, let's say, 8% annually
and a standard deviation of 15%. Many thanks.


Gary''s Student

Generating lognormal equity returns
 
I am sorry. I re-read your post. If all you want are random samples and not
the CDF, then in A1 enter:
=EXP(NORMINV(RAND(),0.08,0.15)) and copy down for as many samples as you need
--
Gary''s Student - gsnu200725


"Sheak1" wrote:

Would anyone have any sample code that I can use to generate a random series
of monthly lognormal equity returns with a mean of, let's say, 8% annually
and a standard deviation of 15%. Many thanks.



All times are GMT +1. The time now is 02:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com