Serving the Quantitative Finance Community

  • 1
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
 
User avatar
Cuchulainn
Topic Author
Posts: 20252
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

User feedback Mr. sitmo's prng

December 16th, 2013, 6:19 pm

QuoteOriginally posted by: outrunWhat is "dynamic" ? Just a template parameter that is determined at run time, not compile time. I don't like but I will remove it later. QuoteDo you perpaps re-create the BoxMuller object inside a loop instead of outside? This will cause the rng to restart every time.No, once.
Last edited by Cuchulainn on December 15th, 2013, 11:00 pm, edited 1 time in total.
 
User avatar
Polter
Posts: 1
Joined: April 29th, 2008, 4:55 pm

User feedback Mr. sitmo's prng

December 16th, 2013, 6:27 pm

QuoteOriginally posted by: CuchulainnQuoteI must say I think the first result is a bit strange? How come different fdm methods don't give different results? I think1. the methods are close in accuracy anyways2. large NT, NSI can take NT = 100 and then see ....Cuch, when increasing NT and NS, try to do this in a controlled manner, preferably along the asymptotic optimal tradeoff curve (note: different proportionality exponent for a different order). See Duffie, D. and Glynn, P. (1995) "Efficient Monte Carlo Simulation of Security Prices."// http://www.stanford.edu/~duffie/jstorli ... ynn1.pdf// Further refinement (attempt at estimating the unknown optimal constant of proportionality): http://citeseerx.ist.psu.edu/viewdoc/do ... 1&type=pdf
 
User avatar
Cuchulainn
Topic Author
Posts: 20252
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

User feedback Mr. sitmo's prng

December 16th, 2013, 6:30 pm

QuoteOriginally posted by: PolterQuoteOriginally posted by: CuchulainnQuoteI must say I think the first result is a bit strange? How come different fdm methods don't give different results? I think1. the methods are close in accuracy anyways2. large NT, NSI can take NT = 100 and then see ....Cuch, when increasing NT and NS, try to do this in a controlled manner, preferably along the asymptotic optimal tradeoff curve (note: different proportionality exponent for a different order). See Duffie, D. and Glynn, P. (1995) "Efficient Monte Carlo Simulation of Security Prices."// http://www.stanford.edu/~duffie/jstorli ... ynn1.pdf// Further refinement (attempt at estimating the unknown optimal constant of proportionality): http://citeseerx.ist.psu.edu/viewdoc/do ... ype=pdfyes, good idea.It was only today we got the stuff up and running Btw whatever, sitmos result look good. Most of my schemes are weak or strong convergent of order dt, dt^1/2.Till now I am doing GBM and plain options. The code also supports Asian, barrier and lookbacks and path dependencies.
Last edited by Cuchulainn on December 15th, 2013, 11:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Topic Author
Posts: 20252
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

User feedback Mr. sitmo's prng

December 17th, 2013, 7:44 am

Anyways, I now use a swicth statement instead of a large if else .. and I get different results now ... keep tuned
 
User avatar
Cuchulainn
Topic Author
Posts: 20252
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

User feedback Mr. sitmo's prng

December 17th, 2013, 4:17 pm

Initial results using Sitmo Box MullerNT = 500, NS = 100000Euler 5.8492Extrap Euler 5.8491Milstein 5.8493PC using mid point 5.8495Exact 5.84584 So, looks reasonable.
Last edited by Cuchulainn on December 16th, 2013, 11:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Topic Author
Posts: 20252
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

User feedback Mr. sitmo's prng

December 17th, 2013, 4:20 pm

QuoteOriginally posted by: outrunI remember a discussion about readability of nested ifs, issues like that are difficult to find.It was a stupid mistake on my part; I wonder how many analogous logic errors are in production systems in general? The code works and gives results but ... edit: I still had to do the code review as well after testing the sitmo.
Last edited by Cuchulainn on December 16th, 2013, 11:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Topic Author
Posts: 20252
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

User feedback Mr. sitmo's prng

December 17th, 2013, 7:12 pm

.NET has support for cryptographically strong rnsIs dat wat?
 
User avatar
Cuchulainn
Topic Author
Posts: 20252
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

User feedback Mr. sitmo's prng

December 17th, 2013, 7:39 pm

Find? I knew it for years I just didn't tell anyone!Here is my example. Q: is the byte stuff OK?QuoteWe could run it though the TestU01 framework and test its random quality?You mean the output?? It is C# code.
Last edited by Cuchulainn on December 16th, 2013, 11:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Topic Author
Posts: 20252
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

User feedback Mr. sitmo's prng

December 17th, 2013, 7:49 pm

QuoteOriginally posted by: outrunah! I see!luckily *I* found the answer at google to your complicated question about bits and bytes I see; Next Q I want a double; is this correct?
Last edited by Cuchulainn on December 16th, 2013, 11:00 pm, edited 1 time in total.