Top Posts
- msum using sliding window in kdb+
- Generate all subsets of a string in q/KDB+
- Cumulative Normal Distribution in Q/KDB+
- N Queens : all possible solutions in q/kdb+
- Regular Expressions in q/KDB+
- Equality of Strings in q/KDB+
- Shorter Code to Generate all Permutations of a string in q/KDB+
- Happy Pi Day - Calculation of Pi in q/KDB+
- Generate all permutations in q/KDB+
- Learning Q KDB+
Categories
- KDB (6)
- Pricing (4)
- Q (17)
- Q Idioms (3)
- Regression (3)
- Regular Expressions (3)
- Time Series (1)
-
Join 18 other subscribers
Archives
Tag Cloud
Blog Stats
- 73,295 hits
Tag Archives: Maths
Cumulative Normal Distribution in Q/KDB+
I have implemented the numerical approximation for the normal cumulative distribution function(cdf) here. Normal cdf is very important in financial mathematics because of its applications, one of them being in Black Scholes pricing. Mathematically, can be expressed as : Q … Continue reading
Greatest Common Divisor in Q/KDB+
Euclid’s algorithm : Recursive definition of the gcd function using Euclid’s algorithm is : function gcd(a, b) { if (b = 0) return a else return gcd(b, a mod b) } Solution in Q : g:{$[y=0;:x;:g[y;x mod y]];} Results : … Continue reading