|
Anthony's VBA Forum Where the knowledge is shared |
|
|
View previous topic :: View next topic |
Author |
Message |
Lim
Joined: 27 Oct 2004 Posts: 7
|
Posted: Wed Oct 27, 2004 3:08 am Post subject: Correlated Random Number Generation |
|
|
Can anyone explain to me how to generate correlated random numbers. If possible, could you send me an example in excel or VBA. TQ very much. |
|
Back to top |
|
|
Anthony Site Admin
Joined: 29 Sep 2004 Posts: 36 Location: New York, USA
|
Posted: Wed Oct 27, 2004 3:28 pm Post subject: |
|
|
Lim,
What do you mean by that? Could you provide an example?
Anthony |
|
Back to top |
|
|
Lim
Joined: 27 Oct 2004 Posts: 7
|
Posted: Wed Oct 27, 2004 8:36 pm Post subject: |
|
|
Assuming I need to generate three correlated random numbers. All of them are normally distributed. I manage to generate the normally distrbuted random number individually or two correlated random number. But I encounter difficulty to generate the three correlated random number. For example, forex return on EUR, JPY and GBP. |
|
Back to top |
|
|
Anthony Site Admin
Joined: 29 Sep 2004 Posts: 36 Location: New York, USA
|
Posted: Wed Oct 27, 2004 10:17 pm Post subject: |
|
|
Lim,
Please check my Multivariate probability distribution example. You can easily use that example for your purpose.
Anthony |
|
Back to top |
|
|
Guest
|
Posted: Wed Nov 03, 2004 1:28 pm Post subject: Re: Correlated Random Number Generation |
|
|
[quote="Lim"]Can anyone explain to me how to generate correlated random numbers. If possible, could you send me an example in excel or VBA. TQ very much. [/quote] |
|
Back to top |
|
|
Anthony Site Admin
Joined: 29 Sep 2004 Posts: 36 Location: New York, USA
|
Posted: Wed Nov 03, 2004 5:00 pm Post subject: |
|
|
Lim,
Please read the multivariant distribution example. It will help you to geneate the random number. In about a month, I will have all the examples available in Excel files for download for a fee ($9.95).
If you always know how to incorporate the codes into Excel, you can do it yourself. Just copy and paste the code into a module and follow the instruction from the example.
Step 4 is the part that generate the numbers.
'** 4. Generate random numbers from a multivariant standard normal distribution and compute the probability. In your prior question about the FX, each currency will have its own random number and the number is correlated with others.
Please sign my guest book and fill all the questions. Thanks.
Anthony |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2002 phpBB Group
|