Algorithms and Q
If you like solving problems then you already know the importance of the algorithms and how it generalizes a set of problems. I like exploring algorithms and thought it would be good to implement some of them in q as learning exercises for the q beginners.
Here is the list of algorithms I have implemented in q/Kdb :
- Chebyshev Distance
- Thâbit ibn Kurrah rule
- Trabb Pardo–Knuth algorithm
- Truncatable Primes
- Levenshtein distance
- Hamming distance
- Euclidean distance
- Triangular number
- Collatz conjecture
- Champernowne’s constant
- Amicable numbers
- Maximum path sum
Statistics, Quantitative analysis, and Q
- Standard Deviation
- Absolute deviation
- Median Absolute Deviation
- MS Excel stddev vs. KDB dev
- Standard Deviation Vs Absolute Deviation
- Moving Average
- Mode
- Simple Moving Average
- Cumulative Moving Average
- Sharpe Ratio
- Sortino Ratio
- Covariance
- Variance
- OHLC (Open-High-Low-Close)
Kdb/q Tutorials, Tips & Tricks
- Creating a table in KDB
- Recursion
- nth root
- Step Function
- Mode Function
- Cumulative sum & Moving sum
- Symbol Vs String
- Temporal Datatypes
- Timestamp Vs Timespan
- Loading multiple CSV files in KDB
Kdb/q Exercises
- Armstrong number
- Fibonacci sequence
- Lucas Numbers
- Combinations of substrings
- Generate all unique substrings
- Pythagorean triplet
- Largest product of five consecutive digits
- Find a number is prime or not
- Circular primes below one million
- Natural numbers that are multiples of 3 or 5
- Smallest number divisible by numbers from 1 to 20
- Champernowne’s constant
- Triangular number