{
  "_id": "6a17f22cacfb0bcc41da769f",
  "Package": "NFCP",
  "Title": "N-Factor Commodity Pricing Through Term Structure Estimation",
  "Version": "1.2.2",
  "Authors@R": "c(person(\"Thomas\", \"Aspinall\", email = \"tomaspinall2512@gmail.com\", \nrole = c(\"aut\", \"cre\"),\ncomment = c(ORCID = \"0000-0002-6968-1989\")),\nperson(\"Adrian\", \"Gepp\", email = \"adgepp@bond.edu.au\",\nrole = c(\"aut\"),\ncomment = c(ORCID = \"0000-0003-1666-5501\")),\nperson(\"Geoff\", \"Harris\", email = \"gharris@bond.edu.au\",\nrole = c(\"aut\"),\ncomment = c(ORCID = \"0000-0003-4284-8619\")),\nperson(\"Simone\", \"Kelly\", email = \"skelly@bond.edu.au\",\nrole = c(\"aut\"),\ncomment = c(ORCID = \"0000-0002-6528-8557\")),\nperson(\"Colette\", \"Southam\", email = \"csoutham@bond.edu.au\",\nrole = c(\"aut\"),\ncomment = c(ORCID = \"0000-0001-7263-2347\")),\nperson(\"Bruce\", \"Vanstone\", email = \"bvanston@bond.edu.au\",\nrole = c(\"aut\"),\ncomment = c(ORCID = \"0000-0002-3977-2468\")) )",
  "Description": "Commodity pricing models are (systems of) stochastic\ndifferential equations that are utilized for the valuation and\nhedging of commodity contingent claims (i.e. derivative\nproducts on the commodity) and other commodity related\ninvestments. Commodity pricing models that capture market\ndynamics are of great importance to commodity market\nparticipants in order to exercise sound investment and\nrisk-management strategies. Parameters of commodity pricing\nmodels are estimated through maximum likelihood estimation,\nusing available term structure futures data of a commodity.\n'NFCP' (n-factor commodity pricing) provides a framework for\nthe modeling, parameter estimation, probabilistic forecasting,\noption valuation and simulation of commodity prices through\nstate space and Monte Carlo methods, risk-neutral valuation and\nKalman filtering. 'NFCP' allows the commodity pricing model to\nconsist of n correlated factors, with both random walk and\nmean-reverting elements. The n-factor commodity pricing model\nframework was first presented in the work of Cortazar and\nNaranjo (2006) <doi:10.1002/fut.20198>. Examples presented in\n'NFCP' replicate the two-factor crude oil commodity pricing\nmodel presented in the prolific work of Schwartz and Smith\n(2000) <doi:10.1287/mnsc.46.7.893.12034> with the approximate\nterm structure futures data applied within this study provided\nin the 'NFCP' package.",
  "License": "GPL-3",
  "Encoding": "UTF-8",
  "LazyData": "true",
  "RoxygenNote": "7.3.2",
  "RdMacros": "mathjaxr, Rdpack",
  "VignetteBuilder": "knitr",
  "Repository": "https://tomaspinall.r-universe.dev",
  "Date/Publication": "2025-06-16 21:31:37 UTC",
  "RemoteUrl": "https://github.com/tomaspinall/nfcp",
  "RemoteRef": "HEAD",
  "RemoteSha": "4628b2705b36059a8de3cf99fc19e42b24b18b39",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-28 07:40:06 UTC",
    "User": "root"
  },
  "Author": "Thomas Aspinall [aut, cre] (ORCID:\n<https://orcid.org/0000-0002-6968-1989>),\nAdrian Gepp [aut] (ORCID: <https://orcid.org/0000-0003-1666-5501>),\nGeoff Harris [aut] (ORCID: <https://orcid.org/0000-0003-4284-8619>),\nSimone Kelly [aut] (ORCID: <https://orcid.org/0000-0002-6528-8557>),\nColette Southam [aut] (ORCID: <https://orcid.org/0000-0001-7263-2347>),\nBruce Vanstone [aut] (ORCID: <https://orcid.org/0000-0002-3977-2468>)",
  "Maintainer": "Thomas Aspinall <tomaspinall2512@gmail.com>",
  "MD5sum": "ec772d3d9138a3f70c3e83da6fe680f1",
  "_user": "tomaspinall",
  "_type": "src",
  "_file": "NFCP_1.2.2.tar.gz",
  "_fileid": "50ad248a008d63f78caeb1a422a97b117093907ecb56111cb7f81e0938d4ae26",
  "_filesize": 2799626,
  "_sha256": "50ad248a008d63f78caeb1a422a97b117093907ecb56111cb7f81e0938d4ae26",
  "_created": "2026-05-28T07:40:06.000Z",
  "_published": "2026-05-28T07:43:40.537Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 78245579389,
      "time": 131,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7260341244"
    },
    {
      "job": 78245579340,
      "time": 119,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7260337674"
    },
    {
      "job": 78245579391,
      "time": 180,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7260345120"
    },
    {
      "job": 78245579393,
      "time": 125,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7260331672"
    },
    {
      "job": 78245123670,
      "time": 184,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7260299369"
    },
    {
      "job": 78245579409,
      "time": 96,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7260330525"
    },
    {
      "job": 78245579434,
      "time": 74,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7260323587"
    },
    {
      "job": 78245579417,
      "time": 69,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7260322149"
    },
    {
      "job": 78245579408,
      "time": 79,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7260324877"
    }
  ],
  "_buildurl": "https://github.com/r-universe/tomaspinall/actions/runs/26561402890",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/tomaspinall/nfcp",
  "_commit": {
    "id": "4628b2705b36059a8de3cf99fc19e42b24b18b39",
    "author": "TomAspinall <tomaspinall2512@gmail.com>",
    "committer": "TomAspinall <tomaspinall2512@gmail.com>",
    "message": "update cran-comments.md\n",
    "time": 1750109497
  },
  "_maintainer": {
    "name": "Thomas Aspinall",
    "email": "tomaspinall2512@gmail.com",
    "login": "tomaspinall",
    "twitter": "@TommyAspinall1",
    "description": "FTE Data Scientist && Comp Finance PhD pushing open source modules in R and Python, with a finance focus",
    "uuid": 71994479,
    "orcid": "0000-0002-6968-1989"
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.5.0",
      "role": "Depends"
    },
    {
      "package": "FKF.SP",
      "role": "Imports"
    },
    {
      "package": "LSMRealOptions",
      "role": "Imports"
    },
    {
      "package": "MASS",
      "role": "Imports"
    },
    {
      "package": "numDeriv",
      "role": "Imports"
    },
    {
      "package": "parallel",
      "role": "Imports"
    },
    {
      "package": "rgenoud",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "mathjaxr",
      "role": "Imports"
    },
    {
      "package": "Rdpack",
      "role": "Imports"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    }
  ],
  "_owner": "tomaspinall",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2025-25",
      "n": 5
    }
  ],
  "_tags": [],
  "_stars": 6,
  "_contributors": [
    {
      "user": "tomaspinall",
      "count": 54,
      "uuid": 71994479
    }
  ],
  "_userbio": {
    "uuid": 71994479,
    "type": "user",
    "name": "Thomas Aspinall",
    "description": "FTE Data Scientist && Comp Finance PhD pushing open source modules in R and Python, with a finance focus"
  },
  "_downloads": {
    "count": 250,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/NFCP"
  },
  "_devurl": "https://github.com/tomaspinall/nfcp",
  "_searchresults": 6,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/NFCP.html",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/tomaspinall/nfcp",
  "_realowner": "tomaspinall",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.1.0",
      "date": "2021-01-13"
    },
    {
      "version": "0.2.0",
      "date": "2021-02-25"
    },
    {
      "version": "1.0.0",
      "date": "2021-05-02"
    },
    {
      "version": "1.0.1",
      "date": "2021-05-06"
    },
    {
      "version": "1.1.0",
      "date": "2021-06-25"
    },
    {
      "version": "1.2.0",
      "date": "2021-08-07"
    },
    {
      "version": "1.2.1",
      "date": "2022-02-17"
    },
    {
      "version": "1.2.2",
      "date": "2025-06-16"
    }
  ],
  "_exports": [
    "A_T",
    "American_option_value",
    "cov_func",
    "European_option_value",
    "futures_price_forecast",
    "futures_price_simulate",
    "NFCP_domains",
    "NFCP_Kalman_filter",
    "NFCP_MLE",
    "NFCP_parameters",
    "spot_price_forecast",
    "spot_price_simulate",
    "stitch_contracts",
    "TSfit_volatility"
  ],
  "_datasets": [
    {
      "name": "SS_oil",
      "title": "Crude oil term structure futures data (1990 - 1995)",
      "object": "SS_oil",
      "class": [
        "list"
      ],
      "fields": [],
      "table": false,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "American_option_value",
      "title": "N-factor model American options on futures contracts valuation",
      "topics": [
        "American_option_value"
      ]
    },
    {
      "page": "European_option_value",
      "title": "N-factor model European options on futures contracts valuation",
      "topics": [
        "European_option_value"
      ]
    },
    {
      "page": "futures_price_forecast",
      "title": "Forecast the futures prices of an N-factor model",
      "topics": [
        "futures_price_forecast"
      ]
    },
    {
      "page": "futures_price_simulate",
      "title": "Simulate futures prices of an N-factor model through Monte Carlo simulation",
      "topics": [
        "futures_price_simulate"
      ]
    },
    {
      "page": "NFCP_domains",
      "title": "N-Factor MLE search boundaries",
      "topics": [
        "NFCP_domains"
      ]
    },
    {
      "page": "NFCP_Kalman_filter",
      "title": "Filter an N-factor commodity pricing model though the Kalman filter",
      "topics": [
        "NFCP_Kalman_filter"
      ]
    },
    {
      "page": "NFCP_MLE",
      "title": "N-factor model parameter estimation through the Kalman filter and maximum likelihood estimation",
      "topics": [
        "NFCP_MLE"
      ]
    },
    {
      "page": "NFCP_parameters",
      "title": "Specify the constant parameters of an N-factor model",
      "topics": [
        "NFCP_parameters"
      ]
    },
    {
      "page": "spot_price_forecast",
      "title": "Forecast spot prices of an N-factor model",
      "topics": [
        "spot_price_forecast"
      ]
    },
    {
      "page": "spot_price_simulate",
      "title": "Simulate spot prices of an N-factor model through Monte Carlo simulation",
      "topics": [
        "spot_price_simulate"
      ]
    },
    {
      "page": "SS_oil",
      "title": "Crude oil term structure futures data (1990 - 1995)",
      "topics": [
        "SS_oil"
      ]
    },
    {
      "page": "stitch_contracts",
      "title": "Stitch futures contracts",
      "topics": [
        "stitch_contracts"
      ]
    },
    {
      "page": "TSfit_volatility",
      "title": "Calculate the volatility term structure of futures returns",
      "topics": [
        "TSfit_volatility"
      ]
    }
  ],
  "_readme": "https://github.com/tomaspinall/nfcp/raw/HEAD/README.md",
  "_rundeps": [
    "cli",
    "FKF.SP",
    "lifecycle",
    "LSMRealOptions",
    "MASS",
    "mathjaxr",
    "numDeriv",
    "rbibutils",
    "Rdpack",
    "rgenoud",
    "rlang"
  ],
  "_vignettes": [
    {
      "source": "NFCP.Rmd",
      "filename": "NFCP.html",
      "title": "Modeling, Forecasting and Simulating Commodity Prices through Term Structure Estimation using Kalman Filtering: The R Package 'NFCP'",
      "engine": "knitr::rmarkdown",
      "headings": [
        "1. Introduction",
        "2. Term Structure Estimation",
        "3. The N-Factor Model",
        "4. Using the 'NFCP' package:",
        "4.1 Stitching Futures Data",
        "4.2 Filtering commodity pricing models:",
        "4.2.1 Complete, Stitched Data:",
        "4.2.2 Incomplete, Full Contract Data:",
        "4.3 Measurement Error of N-Factor Commodity Pricing Models:",
        "4.4 Estimating N-Factor Commodity Pricing Models:",
        "4.5 N-Factor Model Comparison:",
        "4.6 N-Factor Model Term Structure Fit:",
        "4.7 Plot Contract Observation Error:",
        "4.8 Plot filtered values:",
        "4.9 Plot Standard Deviation of State Variables:",
        "4.10 Forecast Spot and Futures Prices:",
        "4.10.1 Spot Prices:",
        "4.10.2 Futures Prices",
        "4.10.3 Plot the Futures Curve:",
        "4.11 Plot Volatility Term Structure:",
        "4.12 Simulate Spot and Futures Prices:",
        "4.12.1 Spot Prices:",
        "4.12.2 Futures Prices:",
        "4.13 Option Valuation:",
        "5. Discussion:",
        "References:"
      ],
      "created": "2021-01-09 04:03:25",
      "modified": "2022-02-17 11:31:37",
      "commits": 10
    }
  ],
  "_score": 4.477121254719663,
  "_indexed": true,
  "_nocasepkg": "nfcp",
  "_universes": [
    "tomaspinall"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.2.2",
      "date": "2026-05-28T07:42:19.000Z",
      "distro": "noble",
      "commit": "4628b2705b36059a8de3cf99fc19e42b24b18b39",
      "fileid": "8e087d4c6eab401ce80c066187b1c4c42e236594ade84d46fbf0c97df4c090a3",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tomaspinall/actions/runs/26561402890"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.2.2",
      "date": "2026-05-28T07:42:09.000Z",
      "distro": "noble",
      "commit": "4628b2705b36059a8de3cf99fc19e42b24b18b39",
      "fileid": "320be764ddfa3615d481b0d8f590805c275d892841643bc959cdee8caee032d8",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tomaspinall/actions/runs/26561402890"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.2.2",
      "date": "2026-05-28T07:42:35.000Z",
      "commit": "4628b2705b36059a8de3cf99fc19e42b24b18b39",
      "fileid": "9d3ae67fb04808584ea56b219b104714e57f3c9680c9a33cc5d5c180c0e6682b",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tomaspinall/actions/runs/26561402890"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "1.2.2",
      "date": "2026-05-28T07:41:54.000Z",
      "commit": "4628b2705b36059a8de3cf99fc19e42b24b18b39",
      "fileid": "de27046563364d55b059b886d47387bce71fecb4560d463e1ec20468fcdba048",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tomaspinall/actions/runs/26561402890"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "1.2.2",
      "date": "2026-05-28T07:42:02.000Z",
      "commit": "4628b2705b36059a8de3cf99fc19e42b24b18b39",
      "fileid": "461d0bd37c5b8e11d4dfb16b5b5c5b4f0273fc3a72610d405e50ea140986c165",
      "status": "success",
      "buildurl": "https://github.com/r-universe/tomaspinall/actions/runs/26561402890"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.2.2",
      "date": "2026-05-28T07:41:20.000Z",
      "commit": "4628b2705b36059a8de3cf99fc19e42b24b18b39",
      "fileid": "10e469911e1994848cb856ed213142df0ce558cf892f1c2f2ba3546ade8ab631",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tomaspinall/actions/runs/26561402890"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "1.2.2",
      "date": "2026-05-28T07:41:15.000Z",
      "commit": "4628b2705b36059a8de3cf99fc19e42b24b18b39",
      "fileid": "520599045ae232eac1a13d3a005e3dc0605304e97ab57f3d8a220a2844aeca0e",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tomaspinall/actions/runs/26561402890"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "1.2.2",
      "date": "2026-05-28T07:41:21.000Z",
      "commit": "4628b2705b36059a8de3cf99fc19e42b24b18b39",
      "fileid": "d4c001f3d203ad1ca410932c7dd8d1aebe867a4971b58c465b5b87eed3d82acc",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tomaspinall/actions/runs/26561402890"
    }
  ]
}