{
  "_id": "6acb4d0efe5cc25786e8dc76",
  "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-10-11 08:43:23 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",
  "_user": "slihn",
  "_type": "src",
  "_file": "ldhmm_0.6.1.tar.gz",
  "_fileid": "https://r2.ropensci.org/d5e1755cdf27e0ab1d68eb62bb01cd1c275d86036fea08ab08bd162451214707",
  "_filesize": 1569135,
  "_sha256": "d5e1755cdf27e0ab1d68eb62bb01cd1c275d86036fea08ab08bd162451214707",
  "_expires": "2027-01-19T08:47:08.000Z",
  "_created": "2026-10-11T08:43:23.000Z",
  "_published": "2026-10-11T08:47:10.593Z",
  "_buildurl": "https://github.com/r-universe/slihn/actions/runs/38125600852",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_jobs": [
    {
      "job": 114429880763,
      "time": 123,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "11696767686"
    },
    {
      "job": 114429880728,
      "time": 119,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11697227192"
    },
    {
      "job": 114429880778,
      "time": 81,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "11697171765"
    },
    {
      "job": 114429880789,
      "time": 129,
      "config": "macos-release-arm64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11697491332"
    },
    {
      "job": 114429294446,
      "time": 202,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11696718008"
    },
    {
      "job": 114429880768,
      "time": 92,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "11696742704"
    },
    {
      "job": 114429880818,
      "time": 90,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "11697476090"
    },
    {
      "job": 114429880798,
      "time": 109,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "11697421274"
    },
    {
      "job": 114429880752,
      "time": 83,
      "config": "windows-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11697750670"
    }
  ],
  "_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",
    "description": "I am a quant finance developer, researcher, also interested in machine learning in finance. I program primarily in python and R.",
    "uuid": 923019
  },
  "_distro": "resolute",
  "_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",
    "followers": 15,
    "description": "I am a quant finance developer, researcher, also interested in machine learning in finance. I program primarily in python and R."
  },
  "_downloads": {
    "count": 282,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/ldhmm"
  },
  "_searchresults": 21,
  "_rbuild": "4.6.1",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/ldhmm.html",
    "extra/manual.pdf",
    "extra/NEWS.html",
    "extra/NEWS.txt"
  ],
  "_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.6232492903979006,
  "_indexed": true,
  "_nocasepkg": "ldhmm",
  "_universes": [
    "slihn"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.6.1",
      "date": "2026-10-11T08:45:30.000Z",
      "distro": "resolute",
      "commit": "a013108005fb4a75d86a8e1a86a276060cb11db8",
      "fileid": "https://r2.ropensci.org/a52ae993b1fcc045296ee0712e39829cf2d9c9e42041947e101bfd7573544f70",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/slihn/actions/runs/38125600852"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "0.6.1",
      "date": "2026-10-11T08:45:18.000Z",
      "distro": "resolute",
      "commit": "a013108005fb4a75d86a8e1a86a276060cb11db8",
      "fileid": "https://r2.ropensci.org/af439bc7168c7f5bc336ed3a3b9d5e551ada46027e2d08df2f548cd27fb0f3ff",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/slihn/actions/runs/38125600852"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.6.1",
      "date": "2026-10-11T08:45:45.000Z",
      "commit": "a013108005fb4a75d86a8e1a86a276060cb11db8",
      "fileid": "https://r2.ropensci.org/2c9a360a4b7e6bfeab4bd2f133a9f4738f35906940c636c753db5e8d1a2352cd",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/slihn/actions/runs/38125600852"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "0.6.1",
      "date": "2026-10-11T08:46:15.000Z",
      "commit": "a013108005fb4a75d86a8e1a86a276060cb11db8",
      "fileid": "https://r2.ropensci.org/56d93874686791d63cfae423bffe483d344acd698bb187b9f3d7b38d47277a24",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/slihn/actions/runs/38125600852"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.6.1",
      "date": "2026-10-11T08:45:17.000Z",
      "commit": "a013108005fb4a75d86a8e1a86a276060cb11db8",
      "fileid": "https://r2.ropensci.org/cb39d28362c3197c9f26ce29b71d95b113ad4f5eb1410ddd28046571a052fb5b",
      "status": "success",
      "buildurl": "https://github.com/r-universe/slihn/actions/runs/38125600852"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.6.1",
      "date": "2026-10-11T08:44:37.000Z",
      "commit": "a013108005fb4a75d86a8e1a86a276060cb11db8",
      "fileid": "https://r2.ropensci.org/cb9490f07c8069d3bd32924858dd797faff03ccb9de206aaa80ea9bdb830a3ce",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/slihn/actions/runs/38125600852"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.6.1",
      "date": "2026-10-11T08:45:02.000Z",
      "commit": "a013108005fb4a75d86a8e1a86a276060cb11db8",
      "fileid": "https://r2.ropensci.org/d216b0345d830278d5b10f4884dab4430d4e24f46b13c6a73a2218116a23d1d3",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/slihn/actions/runs/38125600852"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "0.6.1",
      "date": "2026-10-11T08:44:32.000Z",
      "commit": "a013108005fb4a75d86a8e1a86a276060cb11db8",
      "fileid": "https://r2.ropensci.org/8638f0651a80fc95099046577da9196d6dfe0a99076196402576bd1fb2fb8ecc",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/slihn/actions/runs/38125600852"
    }
  ]
}