{"id":37063237,"url":"https://github.com/sandyherho/kalimusada","last_synced_at":"2026-01-14T07:04:01.456Z","repository":{"id":326071178,"uuid":"1103582949","full_name":"sandyherho/kalimusada","owner":"sandyherho","description":"A Python solver for the Ma-Chen financial chaotic system with sensitivity analysis and visualization.","archived":false,"fork":false,"pushed_at":"2025-11-25T11:01:09.000Z","size":19110,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-28T16:51:50.918Z","etag":null,"topics":["chaos-theory","financial-modeling","nonlinear-dynamics"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/kalimusada/","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sandyherho.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-25T04:09:48.000Z","updated_at":"2025-11-25T11:01:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sandyherho/kalimusada","commit_stats":null,"previous_names":["sandyherho/kalimusada"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sandyherho/kalimusada","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandyherho%2Fkalimusada","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandyherho%2Fkalimusada/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandyherho%2Fkalimusada/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandyherho%2Fkalimusada/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sandyherho","download_url":"https://codeload.github.com/sandyherho/kalimusada/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandyherho%2Fkalimusada/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28412497,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["chaos-theory","financial-modeling","nonlinear-dynamics"],"created_at":"2026-01-14T07:04:00.730Z","updated_at":"2026-01-14T07:04:01.448Z","avatar_url":"https://github.com/sandyherho.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `kalimusada`: a Python library for solving the Ma-Chen financial chaotic system\n\n[![Python 3.8+](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org/downloads/)\n[![PyPI version](https://img.shields.io/pypi/v/kalimusada.svg)](https://pypi.org/project/kalimusada/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![DOI](https://zenodo.org/badge/1103582949.svg)](https://doi.org/10.5281/zenodo.17710349)\n\n[![NumPy](https://img.shields.io/badge/NumPy-%23013243.svg?logo=numpy\u0026logoColor=white)](https://numpy.org/)\n[![SciPy](https://img.shields.io/badge/SciPy-%230C55A5.svg?logo=scipy\u0026logoColor=white)](https://scipy.org/)\n[![Matplotlib](https://img.shields.io/badge/Matplotlib-%23ffffff.svg?logo=Matplotlib\u0026logoColor=black)](https://matplotlib.org/)\n[![Pandas](https://img.shields.io/badge/pandas-%23150458.svg?logo=pandas\u0026logoColor=white)](https://pandas.pydata.org/)\n[![netCDF4](https://img.shields.io/badge/netCDF4-%23004B87.svg)](https://unidata.github.io/netcdf4-python/)\n[![imageio](https://img.shields.io/badge/imageio-%23172B4D.svg?logo=python\u0026logoColor=white)](https://imageio.github.io/)\n[![tqdm](https://img.shields.io/badge/tqdm-%23FFC107.svg?logo=tqdm\u0026logoColor=black)](https://tqdm.github.io/)\n\nA Python-based solver for demonstrating sensitivity to initial conditions in economic dynamics.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"ma_chen_chaos.gif\" alt=\"Ma-Chen Chaotic Dynamics\" width=\"600\"\u003e\n\u003c/p\u003e\n\n## Model\n\nThe Ma-Chen system describes financial dynamics through three coupled ordinary differential equations:\n\n$$ \\dot{x} = z + (y - a)x, \\quad \\dot{y} = 1 - by - x^2, \\quad \\dot{z} = -x - cz $$\n\nwhere the state variables are:\n\n| Variable | Description | Economic interpretation |\n|:--------:|:------------|:------------------------|\n| $x(t)$ | Interest rate | Cost of borrowing capital |\n| $y(t)$ | Investment demand | Aggregate investment activity |\n| $z(t)$ | Price index | General price level |\n\nand the parameters are:\n\n| Parameter | Description | Chaotic value |\n|:---------:|:------------|:-------------:|\n| $a$ | Savings rate | $0.9$ |\n| $b$ | Investment cost coefficient | $0.2$ |\n| $c$ | Demand elasticity | $1.2$ |\n\nThe solver simulates two trajectories with infinitesimal initial separation $\\delta_0 \\sim \\mathcal{O}(10^{-5})$ to visualize exponential divergence characteristic of deterministic chaos.\n\n## Installation\n\n**From PyPI:**\n```bash\npip install kalimusada\n```\n\n**From source:**\n```bash\ngit clone https://github.com/sandyherho/kalimusada.git\ncd kalimusada\npip install -e .\n```\n\n## Quick start\n\n**CLI:**\n```bash\nkalimusada case1          # run standard chaos scenario\nkalimusada --all          # run all test cases\n```\n\n**Python API:**\n```python\nfrom kalimusada import MaChenSolver, MaChenSystem\n\nsystem = MaChenSystem(a=0.9, b=0.2, c=1.2)\nsolver = MaChenSolver()\n\nresult = solver.solve(\n    system=system,\n    init_A=[1.0, 2.0, 0.5],\n    init_B=[1.00001, 2.0, 0.5],\n    t_span=(0, 250),\n    n_points=100000\n)\n\nprint(f\"Max divergence: {result['max_euclidean_distance']:.6f}\")\n```\n\n## Features\n\n- High-precision ODE integration (LSODA)\n- Dual trajectory sensitivity analysis\n- Error metrics: Euclidean distance, RMSE, log divergence\n- Output formats: CSV, NetCDF, PNG, GIF\n\n## License\n\nMIT © Sandy H. S. Herho\n\n## Citation\n\n```bibtex\n@software{herho2025_kalimusada,\n  title   = {kalimusada: A Python library for solving the Ma-Chen financial chaotic system},\n  author  = {Herho, Sandy H. S.},\n  year    = {2025},\n  url     = {https://github.com/sandyherho/kalimusada}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandyherho%2Fkalimusada","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandyherho%2Fkalimusada","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandyherho%2Fkalimusada/lists"}