{"id":19005909,"url":"https://github.com/rbeeli/quantutils.jl","last_synced_at":"2025-08-02T12:36:41.123Z","repository":{"id":208013026,"uuid":"720593206","full_name":"rbeeli/QuantUtils.jl","owner":"rbeeli","description":"Utility functions commonly used in quantitative finance.","archived":false,"fork":false,"pushed_at":"2025-07-19T03:17:31.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-19T08:48:46.605Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rbeeli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-11-19T00:29:20.000Z","updated_at":"2025-07-19T03:17:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"86898836-741c-4075-8641-b967c3f67a4b","html_url":"https://github.com/rbeeli/QuantUtils.jl","commit_stats":null,"previous_names":["rbeeli/quantutils.jl"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rbeeli/QuantUtils.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbeeli%2FQuantUtils.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbeeli%2FQuantUtils.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbeeli%2FQuantUtils.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbeeli%2FQuantUtils.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rbeeli","download_url":"https://codeload.github.com/rbeeli/QuantUtils.jl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbeeli%2FQuantUtils.jl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268390774,"owners_count":24243114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T18:29:36.093Z","updated_at":"2025-08-02T12:36:41.074Z","avatar_url":"https://github.com/rbeeli.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QuantUtils.jl\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nUtility functions commonly used in Quantitative Finance and Machine Learning.\nThe functions make use of multiple dispatch and aim to be type stable for best performance.\n\nThe package aims to be lightweight with minimal dependencies.\n\n## Functions\n\n### Combinatorics\n\n```julia\nparams_combinations(params; filter, shuffle)\n```\n\n### Conversion\n\n```julia\nnan_to_zero(x)\nnan_to_one(x)\nnan_to_x(x, nan_value)\n```\n\n### Imputation\n\n```julia\nffill(df::AbstractDataFrame, where=isnan; cols=names(df), ignore_cols=nothing, fill=(curr, prev) -\u003e prev)\nffill!(df::AbstractDataFrame, where=isnan; cols=names(df), ignore_cols=nothing, fill=(curr, prev) -\u003e prev)\nbfill(df::AbstractDataFrame, where=isnan; cols=names(df), ignore_cols=nothing, fill=(curr, prev) -\u003e prev)\nbfill!(df::AbstractDataFrame, where=isnan; cols=names(df), ignore_cols=nothing, fill=(curr, prev) -\u003e prev)\n```\n\n### Partitioning\n\n```julia\nsplit_parts(mat::AbstractMatrix, parts; axis=1)\nsplit_parts(vec::AbstractVector, parts; axis=1)\nsplit_parts(df::AbstractDataFrame, parts; axis=1)\nsplit_parts_to_indices(total_length, parts)\n```\n\n### Window functions\n\n```julia\nrolling_apply(\n    vec::V,\n    window::Int,\n    fn::F\n    ;\n    step::Int=1,\n    item_type=eltype(vec),\n    running::Bool=false,\n    parallel::Bool=false\n) where {V\u003c:AbstractVector,F\u003c:Function}\n\nrolling_apply(\n    mat::M,\n    window::Int,\n    fn::F\n    ;\n    dim::Int=1, # dimension to apply function along (1=rows, 2=columns)\n    step::Int=1,\n    item_type=eltype(mat),\n    running::Bool=false,\n    parallel::Bool=false\n) where {M\u003c:AbstractMatrix,F\u003c:Function}\n```\n\n## Dependencies\n\n- [DataFrames.jl](https://dataframes.juliadata.org/stable/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbeeli%2Fquantutils.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frbeeli%2Fquantutils.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbeeli%2Fquantutils.jl/lists"}