{
  "_id": "6a1017ebacfb0bcc41c85257",
  "Package": "ldhmm",
  "Type": "Package",
  "Title": "Hidden Markov Model for Financial Time-Series Based on Lambda\nDistribution",
  "Version": "0.6.1",
  "Date": "2023-12-31",
  "Authors@R": "person(given = c(\"Stephen\", \"H-T.\"), family = \"Lihn\",\nemail = \"stevelihn@gmail.com\", role = c(\"aut\", \"cre\"))",
  "Author": "Stephen H-T. Lihn [aut, cre]",
  "Maintainer": "Stephen H-T. Lihn <stevelihn@gmail.com>",
  "Description": "Hidden Markov Model (HMM) based on symmetric lambda\ndistribution framework is implemented for the study of return\ntime-series in the financial market. Major features in the\nS&P500 index, such as regime identification, volatility\nclustering, and anti-correlation between return and volatility,\ncan be extracted from HMM cleanly. Univariate symmetric lambda\ndistribution is essentially a location-scale family of\nexponential power distribution. Such distribution is suitable\nfor describing highly leptokurtic time series obtained from the\nfinancial market. It provides a theoretically solid foundation\nto explore such data where the normal distribution is not\nadequate. The HMM implementation follows closely the book:\n\"Hidden Markov Models for Time Series\", by Zucchini, MacDonald,\nLangrock (2016).",
  "URL": "https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2979516\nhttps://papers.ssrn.com/sol3/papers.cfm?abstract_id=3435667",
  "License": "Artistic-2.0",
  "Encoding": "UTF-8",
  "RoxygenNote": "7.2.3",
  "Collate": "'ecld-cdf-method.R' 'ecld-class.R' 'ecld-constructor.R'\n'ecld-pdf-method.R' 'ecld-sd-method.R'\n'ldhmm-calc_stats_from_obs.R' 'ldhmm-numericOrNull-class.R'\n'ldhmm-package.R' 'ldhmm-class.R' 'ldhmm-conditional_prob.R'\n'ldhmm-constructor.R' 'ldhmm-data-config-internal.R'\n'ldhmm-decode_stats_history.R' 'ldhmm-decoding.R'\n'ldhmm-df2ts-method.R' 'ldhmm-forecast_prob.R'\n'ldhmm-forecast_state.R' 'ldhmm-forecast_volatility.R'\n'ldhmm-fred_data.R' 'ldhmm-gamma_init.R'\n'ldhmm-get-data-method.R' 'ldhmm-ld_stats.R'\n'ldhmm-log_forward.R' 'ldhmm-mle.R' 'ldhmm-mllk.R'\n'ldhmm-n2w.R' 'ldhmm-plot_spx_vix_obs.R'\n'ldhmm-pseudo_residuals.R' 'ldhmm-read-csv-by-symbol-method.R'\n'ldhmm-read_sample_object.R' 'ldhmm-simulate_abs_acf.R'\n'ldhmm-simulate_state_transition.R' 'ldhmm-sma.R'\n'ldhmm-state_ld.R' 'ldhmm-state_pdf.R' 'ldhmm-ts_abs_acf.R'\n'ldhmm-ts_log_rtn.R' 'ldhmm-viterbi.R' 'ldhmm-w2n.R'",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-14 05:36:26 UTC",
    "User": "root"
  },
  "Config/pak/sysreqs": "cmake",
  "Repository": "https://slihn.r-universe.dev",
  "Date/Publication": "2023-12-12 02:42:22 UTC",
  "RemoteUrl": "https://github.com/cran/ldhmm",
  "RemoteRef": "HEAD",
  "RemoteSha": "a013108005fb4a75d86a8e1a86a276060cb11db8",
  "MD5sum": "e46a0514c9ce00f3ed6d8d71d2c8d7d2",
  "_user": "slihn",
  "_type": "src",
  "_file": "ldhmm_0.6.1.tar.gz",
  "_fileid": "be8d117edbcb59a4f13af793452216104bd9a9ad882715f6011bdd31b8af8ec6",
  "_filesize": 1570133,
  "_sha256": "be8d117edbcb59a4f13af793452216104bd9a9ad882715f6011bdd31b8af8ec6",
  "_created": "2026-05-14T05:36:26.000Z",
  "_published": "2026-05-22T08:46:35.250Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 77346358984,
      "time": 139,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "6987925064"
    },
    {
      "job": 77346359079,
      "time": 127,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6987921311"
    },
    {
      "job": 77346359121,
      "time": 81,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7010766144"
    },
    {
      "job": 77346359051,
      "time": 87,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6987913175"
    },
    {
      "job": 77346358703,
      "time": 188,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6987895356"
    },
    {
      "job": 77346358294,
      "time": 120,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7156476537"
    },
    {
      "job": 77346359090,
      "time": 86,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "6987912917"
    },
    {
      "job": 77346359049,
      "time": 95,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "6987914741"
    },
    {
      "job": 77346359006,
      "time": 249,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6987946618"
    }
  ],
  "_buildurl": "https://github.com/r-universe/slihn/actions/runs/25843713249",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/cran/ldhmm",
  "_commit": {
    "id": "a013108005fb4a75d86a8e1a86a276060cb11db8",
    "author": "Stephen H-T. Lihn <stevelihn@gmail.com>",
    "committer": "cran-robot <csardi.gabor+cran@gmail.com>",
    "message": "version 0.6.1\n",
    "time": 1702348942
  },
  "_maintainer": {
    "name": "Stephen H-T. Lihn",
    "email": "stevelihn@gmail.com",
    "login": "slihn",
    "uuid": 923019
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.2.0",
      "role": "Depends"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "utils",
      "role": "Imports"
    },
    {
      "package": "gnorm",
      "role": "Imports"
    },
    {
      "package": "optimx",
      "role": "Imports"
    },
    {
      "package": "xts",
      "version": ">= 0.10-0",
      "role": "Imports"
    },
    {
      "package": "zoo",
      "role": "Imports"
    },
    {
      "package": "moments",
      "role": "Imports"
    },
    {
      "package": "parallel",
      "role": "Imports"
    },
    {
      "package": "graphics",
      "role": "Imports"
    },
    {
      "package": "scales",
      "role": "Imports"
    },
    {
      "package": "ggplot2",
      "role": "Imports"
    },
    {
      "package": "grid",
      "role": "Imports"
    },
    {
      "package": "yaml",
      "role": "Imports"
    },
    {
      "package": "methods",
      "role": "Imports"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "role": "Suggests"
    },
    {
      "package": "depmixS4",
      "role": "Suggests"
    },
    {
      "package": "roxygen2",
      "role": "Suggests"
    },
    {
      "package": "R.rsp",
      "role": "Suggests"
    },
    {
      "package": "shape",
      "role": "Suggests"
    }
  ],
  "_owner": "cran",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [],
  "_tags": [],
  "_stars": 2,
  "_contributors": [
    {
      "user": "slihn",
      "count": 6,
      "uuid": 923019
    }
  ],
  "_userbio": {
    "uuid": 923019,
    "type": "user",
    "name": "Stephen Lihn",
    "description": "I am a quant finance developer, researcher, also interested in machine learning in finance. I program primarily in python and R."
  },
  "_downloads": {
    "count": 161,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/ldhmm"
  },
  "_searchresults": 19,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/ldhmm.html",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "manual.pdf"
  ],
  "_realowner": "slihn",
  "_cranurl": false,
  "_releases": [
    {
      "version": "0.1.0",
      "date": "2017-04-13"
    },
    {
      "version": "0.4.1",
      "date": "2017-06-03"
    },
    {
      "version": "0.4.2",
      "date": "2017-08-05"
    },
    {
      "version": "0.4.5",
      "date": "2018-02-28"
    },
    {
      "version": "0.5.1",
      "date": "2019-12-05"
    },
    {
      "version": "0.6.1",
      "date": "2023-12-11"
    }
  ],
  "_exports": [
    "ecld",
    "ecld.ccdf",
    "ecld.cdf",
    "ecld.kurt",
    "ecld.kurtosis",
    "ecld.mean",
    "ecld.pdf",
    "ecld.sd",
    "ecld.skewness",
    "ecld.var",
    "ldhmm",
    "ldhmm.calc_stats_from_obs",
    "ldhmm.conditional_prob",
    "ldhmm.decode_stats_history",
    "ldhmm.decoding",
    "ldhmm.df2ts",
    "ldhmm.drop_outliers",
    "ldhmm.forecast_prob",
    "ldhmm.forecast_state",
    "ldhmm.forecast_volatility",
    "ldhmm.fred_data",
    "ldhmm.gamma_init",
    "ldhmm.get_data",
    "ldhmm.get_data.arr",
    "ldhmm.get_data.ts",
    "ldhmm.ld_stats",
    "ldhmm.log_backward",
    "ldhmm.log_forward",
    "ldhmm.mle",
    "ldhmm.mllk",
    "ldhmm.n2w",
    "ldhmm.plot_spx_vix_obs",
    "ldhmm.pseudo_residuals",
    "ldhmm.read_csv_by_symbol",
    "ldhmm.read_sample_object",
    "ldhmm.simulate_abs_acf",
    "ldhmm.simulate_state_transition",
    "ldhmm.sma",
    "ldhmm.state_ld",
    "ldhmm.state_pdf",
    "ldhmm.ts_abs_acf",
    "ldhmm.ts_log_rtn",
    "ldhmm.viterbi",
    "ldhmm.w2n"
  ],
  "_help": [
    {
      "page": "ldhmm-package",
      "title": "ldhmm: A package for HMM using lambda distribution.",
      "topics": [
        "ldhmm-package"
      ]
    },
    {
      "page": "ecld",
      "title": "Constructor of ecld class",
      "topics": [
        "ecld"
      ]
    },
    {
      "page": "ecld-class",
      "title": "An S4 class to represent the lambda distribution",
      "topics": [
        "ecld-class"
      ]
    },
    {
      "page": "ecld.cdf",
      "title": "CDF and CCDF of ecld",
      "topics": [
        "ecld.ccdf",
        "ecld.cdf"
      ]
    },
    {
      "page": "ecld.pdf",
      "title": "Calculate the PDF of an ecld object",
      "topics": [
        "ecld.pdf"
      ]
    },
    {
      "page": "ecld.sd",
      "title": "Compute statistics analytically for an ecld object",
      "topics": [
        "ecld.kurt",
        "ecld.kurtosis",
        "ecld.mean",
        "ecld.sd",
        "ecld.skewness",
        "ecld.var"
      ]
    },
    {
      "page": "ldhmm",
      "title": "Constructor of ldhmm class",
      "topics": [
        "ldhmm"
      ]
    },
    {
      "page": "ldhmm-class",
      "title": "The ldhmm class",
      "topics": [
        "ldhmm-class"
      ]
    },
    {
      "page": "ldhmm.calc_stats_from_obs",
      "title": "Computing the statistics for each state",
      "topics": [
        "ldhmm.calc_stats_from_obs",
        "ldhmm.drop_outliers"
      ]
    },
    {
      "page": "ldhmm.conditional_prob",
      "title": "Computing the conditional probabilities",
      "topics": [
        "ldhmm.conditional_prob"
      ]
    },
    {
      "page": "ldhmm.decode_stats_history",
      "title": "Estimating historical statistics (mean, volatility and kurtosis)",
      "topics": [
        "ldhmm.decode_stats_history"
      ]
    },
    {
      "page": "ldhmm.decoding",
      "title": "Computing the minus log-likelihood (MLLK)",
      "topics": [
        "ldhmm.decoding"
      ]
    },
    {
      "page": "ldhmm.df2ts",
      "title": "Utility to standardize timeseries from data.frame to xts",
      "topics": [
        "ldhmm.df2ts"
      ]
    },
    {
      "page": "ldhmm.forecast_prob",
      "title": "Computing the forecast probability distribution",
      "topics": [
        "ldhmm.forecast_prob"
      ]
    },
    {
      "page": "ldhmm.forecast_state",
      "title": "Computing the state forecast",
      "topics": [
        "ldhmm.forecast_state"
      ]
    },
    {
      "page": "ldhmm.forecast_volatility",
      "title": "Computing the volatility forecast for next one period",
      "topics": [
        "ldhmm.forecast_volatility"
      ]
    },
    {
      "page": "ldhmm.fred_data",
      "title": "Utility to download time series from FRED",
      "topics": [
        "ldhmm.fred_data"
      ]
    },
    {
      "page": "ldhmm.gamma_init",
      "title": "Initializing tansition probability paramter",
      "topics": [
        "ldhmm.gamma_init"
      ]
    },
    {
      "page": "ldhmm.get_data",
      "title": "Read sample data",
      "topics": [
        "ldhmm.get_data",
        "ldhmm.get_data.arr",
        "ldhmm.get_data.ts"
      ]
    },
    {
      "page": "ldhmm.ld_stats",
      "title": "Computes the theoretical statistics per state",
      "topics": [
        "ldhmm.ld_stats"
      ]
    },
    {
      "page": "ldhmm.log_forward",
      "title": "Computing the log forward and backward probabilities",
      "topics": [
        "ldhmm.log_backward",
        "ldhmm.log_forward"
      ]
    },
    {
      "page": "ldhmm.mle",
      "title": "Computing the MLEs",
      "topics": [
        "ldhmm.mle"
      ]
    },
    {
      "page": "ldhmm.mllk",
      "title": "Computing the minus log-likelihood (MLLK)",
      "topics": [
        "ldhmm.mllk"
      ]
    },
    {
      "page": "ldhmm.n2w",
      "title": "Transforming natural parameters to a linear working parameter array",
      "topics": [
        "ldhmm.n2w"
      ]
    },
    {
      "page": "ldhmm.plot_spx_vix_obs",
      "title": "Plotting HMM expected volatility for SPX overlaid with adjusted VIX",
      "topics": [
        "ldhmm.plot_spx_vix_obs"
      ]
    },
    {
      "page": "ldhmm.pseudo_residuals",
      "title": "Computing pseudo-residuals",
      "topics": [
        "ldhmm.pseudo_residuals"
      ]
    },
    {
      "page": "ldhmm.read_csv_by_symbol",
      "title": "Read csv file of sample data",
      "topics": [
        "ldhmm.read_csv_by_symbol"
      ]
    },
    {
      "page": "ldhmm.read_sample_object",
      "title": "Read sample ldhmm object",
      "topics": [
        "ldhmm.read_sample_object"
      ]
    },
    {
      "page": "ldhmm.simulate_abs_acf",
      "title": "Simulating auto-correlation (ACF)",
      "topics": [
        "ldhmm.simulate_abs_acf"
      ]
    },
    {
      "page": "ldhmm.simulate_state_transition",
      "title": "Simulating state transition",
      "topics": [
        "ldhmm.simulate_state_transition"
      ]
    },
    {
      "page": "ldhmm.sma",
      "title": "Simple moving average of a time series",
      "topics": [
        "ldhmm.sma"
      ]
    },
    {
      "page": "ldhmm.state_ld",
      "title": "Constructing the ecld objects per state",
      "topics": [
        "ldhmm.state_ld"
      ]
    },
    {
      "page": "ldhmm.state_pdf",
      "title": "Computing the PDF per state given the observations",
      "topics": [
        "ldhmm.state_pdf"
      ]
    },
    {
      "page": "ldhmm.ts_abs_acf",
      "title": "Computing ACF of the absolute value of a time series",
      "topics": [
        "ldhmm.ts_abs_acf"
      ]
    },
    {
      "page": "ldhmm.ts_log_rtn",
      "title": "Get log-returns from historic prices of an index",
      "topics": [
        "ldhmm.ts_log_rtn"
      ]
    },
    {
      "page": "ldhmm.viterbi",
      "title": "Computing the global decoding by the Viterbi algorithm",
      "topics": [
        "ldhmm.viterbi"
      ]
    },
    {
      "page": "ldhmm.w2n",
      "title": "Transforming working parameter array to natural parameters",
      "topics": [
        "ldhmm.w2n"
      ]
    },
    {
      "page": "numericOrNull-class",
      "title": "The numericOrNull class",
      "topics": [
        "numericOrNull-class"
      ]
    }
  ],
  "_rundeps": [
    "cli",
    "cpp11",
    "farver",
    "ggplot2",
    "glue",
    "gnorm",
    "gtable",
    "isoband",
    "labeling",
    "lattice",
    "lifecycle",
    "moments",
    "nloptr",
    "numDeriv",
    "optimx",
    "pracma",
    "R6",
    "RColorBrewer",
    "rlang",
    "S7",
    "scales",
    "vctrs",
    "viridisLite",
    "withr",
    "xts",
    "yaml",
    "zoo"
  ],
  "_score": 1.5797835966168101,
  "_indexed": true,
  "_nocasepkg": "ldhmm",
  "_universes": [
    "slihn"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.6.1",
      "date": "2026-05-14T05:38:47.000Z",
      "distro": "noble",
      "commit": "a013108005fb4a75d86a8e1a86a276060cb11db8",
      "fileid": "acb608d77543d99b2a865ef2d138429e397c5984005673f73b63fb6a4e1bb152",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/slihn/actions/runs/25843713249"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.6.1",
      "date": "2026-05-14T05:38:28.000Z",
      "distro": "noble",
      "commit": "a013108005fb4a75d86a8e1a86a276060cb11db8",
      "fileid": "b9b4cf16d257b12dbdd4420e50cefaab118b5611d6a57dfcf4ec50e621c7f9ce",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/slihn/actions/runs/25843713249"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.6.1",
      "date": "2026-05-15T05:34:47.000Z",
      "commit": "a013108005fb4a75d86a8e1a86a276060cb11db8",
      "fileid": "aeab256b205b1a930a8c15615b6e67957e4186a8bc3ddc0b1527c7b064e3462d",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/slihn/actions/runs/25843713249"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "0.6.1",
      "date": "2026-05-14T05:37:57.000Z",
      "commit": "a013108005fb4a75d86a8e1a86a276060cb11db8",
      "fileid": "dd3b5c042e9b7ab94a40016c0ca42cae1dbfe96eb48173d901ef8aaecc123720",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/slihn/actions/runs/25843713249"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.6.1",
      "date": "2026-05-14T05:37:40.000Z",
      "commit": "a013108005fb4a75d86a8e1a86a276060cb11db8",
      "fileid": "6897826e0088bbcc1e26f4189ee77c6cb38a956aecdd3706aea027bc8291c265",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/slihn/actions/runs/25843713249"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.6.1",
      "date": "2026-05-14T05:37:49.000Z",
      "commit": "a013108005fb4a75d86a8e1a86a276060cb11db8",
      "fileid": "365ea91b6c0494d292daddfbc5b2328f441be382dd837f558b4347607e7c46ce",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/slihn/actions/runs/25843713249"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "0.6.1",
      "date": "2026-05-14T05:40:25.000Z",
      "commit": "a013108005fb4a75d86a8e1a86a276060cb11db8",
      "fileid": "fe2f9dea67a2cdd87ee241b161cf390a32b384d2b25416a270d165fcc9ae6323",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/slihn/actions/runs/25843713249"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.6.1",
      "date": "2026-05-22T08:46:15.000Z",
      "commit": "a013108005fb4a75d86a8e1a86a276060cb11db8",
      "fileid": "46e87aa1f2fc91ab1c8f2c0cb08e9262fc240a34fc9796ff7d84db98e2a2857b",
      "status": "success",
      "buildurl": "https://github.com/r-universe/slihn/actions/runs/25843713249"
    }
  ]
}