Reputation
4,117
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
1 7 28
Impact
~46k people reached

20h
comment I want to compute the derivative of Black and Scholes option
I have added a worked example: just copy and paste
20h
revised I want to compute the derivative of Black and Scholes option
Added worked example
1d
comment Why is Random faster than RandomReal?
Unfortunately, this is not the issue raised. The question relates to repeated individual calls on RandomReal ... the application does not allow for generating them all in advance.
1d
comment I want to compute the derivative of Black and Scholes option
You should not enter 1/2 (which is exact and symbolic) as .5 (which is a machine number). That is not appropriate if you are seeking exact symbolic solutions.
1d
comment I want to compute the derivative of Black and Scholes option
You can adopt the method used in the book, replacing say the Expect function (from the mathStatica add-on package used in the book) with Mathematica's Expectation function (as you were using in your original code ... together with the LogNormalDistribution. You just have to define which variable has a LogNormalDistribution, and you are good to go.
2d
revised Why is Random faster than RandomReal?
adapted for RandomReal[{0,1}]
2d
revised Why is Random faster than RandomReal?
added 149 characters in body; edited title
2d
comment Why is Random faster than RandomReal?
@MarcoB Absolutely - but in my particular application, I have to do single calls on RandomReal / Random, which is why I am looking at that comparison. Unfortunately, I can't generate them all in one go.
2d
asked Why is Random faster than RandomReal?
2d
answered I want to compute the derivative of Black and Scholes option
2d
awarded  Nice Question
2d
comment Partitioning a list when the cumulative sum exceeds 1
I like clean methods - and yours is super! Thanks. On testing, it is not as fast as it looks ... which may be because of the AddTo (which, in the past, at least, was a slow mma function). Given dat = RandomReal[{0, 1}, 10^6];, your method takes about 1.5 seconds on my Mac ... I was hoping to find something about 3 to 5 times faster.
Feb
6
asked Partitioning a list when the cumulative sum exceeds 1
Jan
16
comment notebook scrolling problem in 10.2: worse than ever? how to fix?
Bluetooth needlessly radiates/microwaves your brain and other bits, when a fixed wire would do the job far better (as you note). Ditch the bluetooth, and make popcorn with your microwave.
Jan
12
comment Random Variate generating strange results when using ProbabilityDistribution
P.S. Your code (just posted) has invalid syntax.
Jan
12
comment Random Variate generating strange results when using ProbabilityDistribution
I can't replicate the problem either [ Mac 10.3 ]. As good etiquette, it would be helpful to post the exact input that you are using: then others can try it, and compare etc.
Dec
22
reviewed Approve Symbolic integration fails while numerical integration succeeds
Dec
22
comment How to generate random natural numbers in $[1, \infty)$?
@george2079 wrote: "RandomInteger[{1, 10},n] satisfies the requirement. (10 is just as far from infinity as any other number you might pick.). /////// Your Uniform[1,10] distribution has a finite upper bound at 10; this is plainly incompatible with the OP's requirement to have an open upper bound, and your example therefore does not satisfy the requirement.
Dec
21
awarded  Nice Answer
Dec
21
revised How to generate random natural numbers in $[1, \infty)$?
Added Logarithmic distribution that works as an inbuilt function