https://learninghub.kx.com/forums/topic/first-project-attempt
https://github.com/TxmJxhn/Kelly-Criterion-Portfolio-Optimizer any feedback would be much appreciated :)
https://learninghub.kx.com/forums/topic/first-project-attempt
https://github.com/TxmJxhn/Kelly-Criterion-Portfolio-Optimizer any feedback would be much appreciated :)
I would add some comments or descriptions for the parameter inputs to the functions for those who don't have a finance background or are not familiar with the Kelly Criterion.
It looks good, but the code style can be improved a bit: - consistency with semicolons, you have it after closing the bracket, but not for all functions - for "-1" messages it probably makes sense to have some wrapper function - possible arguments validation inside of the optimizePortfolio function - maybe you want to have these functions in a specific namespace to avoid clashes during import in bigger project - unit tests and integration test
For example code use backslash to leave it as a multi line comment so those wishing to use this as a library can load the script without it running the example every time.
https://code.kx.com/q/basics/syntax/#comments
See example: https://github.com/KxSystems/kdb-tick/blob/master/tick.q#L50