Serving the Quantitative Finance Community

Search found 90 matches

by jamesbattle
July 10th, 2006, 6:48 pm
Forum: Brainteaser Forum
Topic: What is the Ito Lemma?
Replies: 2
Views: 100393

What is the Ito Lemma?

<t>Somebody gives you the following function and asks you to work out what's going on:It doesn't seem to have a derivative (anywhere) and seems to give problems with the following integral:You decide to try and work it out in a spreadsheet by dividing the interval [0,1] into 1024 equal sized subdivi...
by jamesbattle
March 14th, 2003, 2:20 pm
Forum: Programming and Software Forum
Topic: If you have invested in .Net technology , do you like it ?
Replies: 5
Views: 189685

If you have invested in .Net technology , do you like it ?

<t>Positive Aspects:---------------------*) Fantastic, in terms of power of programming and language interoperability (C#, VB etc)*) A huge and simple to use class framework*) Some nice features over Java, e.g. delegates, foreach, enums, attributes*) Promised direct support for .NET in next big rele...
by jamesbattle
March 10th, 2003, 12:47 pm
Forum: Programming and Software Forum
Topic: C# Question
Replies: 6
Views: 190108

C# Question

<t>Apparently there is a proposal to allow splitting a class between multiple files (to make iteasier to mix auto-generated code with hand-written code), but it will not support C++style header/source splitting. In any case, the C# way is cleaner. Because files are nevertextually included in other f...
by jamesbattle
March 6th, 2003, 1:06 pm
Forum: Programming and Software Forum
Topic: A question on C++/VBA
Replies: 10
Views: 190587

A question on C++/VBA

For the summation part, in C, something ugly like:double avg = 0.0;for (const double* p = &v[0][0]; p <= &v[n-1][m-1]; p++) avg += *p;
by jamesbattle
March 5th, 2003, 5:01 pm
Forum: Programming and Software Forum
Topic: simplest prime-number labeling algorithm
Replies: 18
Views: 191544

simplest prime-number labeling algorithm

<t>a) As I initially indicated, Eratosthanes is good for --small-- primes. It is very simple,i.e. a single function and is quite fast --for the intended purpose--. b) As I indicated, the space for the simplest Eratosthanes implementation is O(n);there are literally dozens of variants, but as it is i...
by jamesbattle
March 5th, 2003, 3:15 pm
Forum: Programming and Software Forum
Topic: simplest prime-number labeling algorithm
Replies: 18
Views: 191544

simplest prime-number labeling algorithm

<r>In reality, I don't think that primes are used all that much... the only algorithm which I recall actually using primes is a hashtable, where a prime just larger than a power of 2 is used. By far the best way, is to tabulate them and this is what's done in the SGI/STL std::hashmap and for the Mic...
by jamesbattle
March 5th, 2003, 12:26 pm
Forum: Programming and Software Forum
Topic: simplest prime-number labeling algorithm
Replies: 18
Views: 191544

simplest prime-number labeling algorithm

<t>Are you saying that you have discovered a new algorithm that calculates primes on the fly, without the storage implied by the ancient Eratosthanes algorithm?For large primes, I thought the situation rapidly becomes -extremely- difficult i.e. a research topic for people who like do do such things ...
by jamesbattle
March 3rd, 2003, 11:08 am
Forum: Programming and Software Forum
Topic: simplest prime-number labeling algorithm
Replies: 18
Views: 191544

simplest prime-number labeling algorithm

The required memory is obviously O(n), (not obvious to me, but fact) is that the number of bitsrequired is O(n(log n)log log n), hence I suppose for your problem, it corresponds to n=10.
by jamesbattle
March 3rd, 2003, 9:11 am
Forum: Programming and Software Forum
Topic: simplest prime-number labeling algorithm
Replies: 18
Views: 191544

simplest prime-number labeling algorithm

<r>While not exactly along the lines of what you're thinking, one of the simplest is the primenumber sieve of Eratoshanes (~300 BC):Make a list of all the integers less than or equal to n (and greater than one). Strike out the multiples of all primes less than or equal to the square root of n, then ...
by jamesbattle
February 27th, 2003, 9:32 pm
Forum: Technical Forum
Topic: 'Derivation' of CMS/DRS convexity adjustment
Replies: 9
Views: 192527

'Derivation' of CMS/DRS convexity adjustment

<t>I'm looking for a pointer to the treatment of constant maturity swaps, a DRS forward rate and the Eurodollar futures correction. I'm aware of the correctionformula in Hull and am wondering if it's possible to extract these from the bondpricing equation, presumably by fixing on one of the models w...
by jamesbattle
February 27th, 2003, 9:11 pm
Forum: Programming and Software Forum
Topic: VBA Random number generation
Replies: 12
Views: 191996

VBA Random number generation

Out of curiosity, what is the opinion on the Ziggurat algorithm as compared to Box-Muller.I understand that this is what Matlab uses, and that it seems to be able to (on average)generate normal random numbers in about the same time as for the uniform distribution.
by jamesbattle
February 27th, 2003, 12:42 pm
Forum: Programming and Software Forum
Topic: how to call a pure virtual function
Replies: 12
Views: 191916

how to call a pure virtual function

<t>Without wanting to debate this, where exactly in the C++ standard did you get the definition of 'call'? I have never seen such a definition, except possibly in FORTRAN where it is a keyword for 'invoking' a sub-routine. Is this definition of 'call' in fact'your' definition?There is nothing specia...
by jamesbattle
February 26th, 2003, 12:48 pm
Forum: Programming and Software Forum
Topic: how to call a pure virtual function
Replies: 12
Views: 191916

how to call a pure virtual function

<t>There is NOTHING that prevents 'calling' a pure virtual function. Consider the following (legal) class definition:class A{public: virtual void f() = 0; void g() { f(); }};This will compile without error and displays the pattern for a common usage of pure virtual functions. i.e. that in an abstrac...
by jamesbattle
February 25th, 2003, 3:58 pm
Forum: Technical Forum
Topic: LU Decomposition without Pivoting
Replies: 7
Views: 190383

LU Decomposition without Pivoting

<t>Yes, it is intuitive.The maths to calculate the L and U in a decomposition as A = LU is quitesimple (Crout's algorithm). A nice description can be found in Numerical Recipes.It's also quite simple to count the number of operations, which will be proportional to n^3. The pivoting does not impact t...
by jamesbattle
February 25th, 2003, 1:47 pm
Forum: Technical Forum
Topic: LU Decomposition without Pivoting
Replies: 7
Views: 190383

LU Decomposition without Pivoting

From memory, the pivoting does not change the complexity of the algorithm, which is proportional to n^3, hence it's difficult to see that an unstable 'optimised' code thatwill work in some cases is preferable to something that's stable and of the complexity?