Skip to content
Back to search

finnts

Microsoft Finance Time Series Forecasting Framework (FinnTS) is a forecasting package that utilizes cutting-edge time series forecasting and parallelization on the cloud to produce accurate forecasts for financial data.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/microsoft/finnts with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/microsoft/finnts'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/microsoft--finnts/badge.svg)](/listings/microsoft--finnts)

HTML

<a href="/listings/microsoft--finnts"><img src="/api/listings/microsoft--finnts/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

CRAN version

install.packages("finnts")

Development version

To get a bug fix or to use a feature from the development version, you can install the development version of finnts from GitHub.

# install.packages("devtools")
devtools::install_github("microsoft/finnts")

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 98 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Microsoft Finance Time Series Forecasting Framework
  2. <img src="man/figures/logo.png" align="right" height="200" style="float:right; height:200px;"/>
  3. <!-- badges: start -->
  4. [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/finnts)](https://cran.r-project.org/package=finnts)
  5. <!-- badges: end -->
  6. The Microsoft Finance Time Series Forecasting Framework, aka finnts or Finn, is an automated forecasting framework for producing financial forecasts. While it was built for corporate finance activities, it can easily expand to any time series forecasting problem!
  7. - Built in AI agent that can act as your own virtual data scientist, always optimizing for the most accurate forecast.
  8. - Automated feature engineering, feature selection, back testing, and model selection.
  9. - Access to 25+ models. Both univariate and multivariate models.
  10. - Azure integration to run thousands of time series in parallel within the cloud.
  11. - Supports daily, weekly, monthly, quarterly, and yearly forecasts.
  12. - Handles external regressors, either purely historical or historical+future values.
  13. ## Use Finn with a coding agent
  14. Don't want to write R code? The [Finn skill](https://github.com/microsoft/finnts/tree/main/skills/finn) lets a coding agent such as GitHub Copilot or Codex install R and finnts, run forecasts, and explain the results for you. Paste this into your agent:
  15. ```
  16. Install the Finn skill from https://github.com/microsoft/finnts/tree/main/skills/finn and help me forecast my data.
  17. ```
  18. ## Installation
  19. ### CRAN version
  20. ``` r
  21. install.packages("finnts")
  22. ```
  23. ### Development version
  24. To get a bug fix or to use a feature from the development version, you can install the development version of finnts from GitHub.
  25. ``` r
  26. # install.packages("devtools")
  27. devtools::install_github("microsoft/finnts")
  28. ```
  29. ## Usage
  30. ``` r
  31. library(finnts)
  32. # prepare historical data
  33. hist_data <- timetk::m4_monthly %>%
  34. dplyr::rename(Date = date) %>%
  35. dplyr::mutate(id = as.character(id))
  36. # connect LLM
  37. llm <- ellmer::chat_azure_openai(model = "gpt-4o-mini")
  38. # set up new forecast project and agent run
  39. project <- set_project_info(project_name = "Demo_Project",
  40. combo_variables = c("id"),
  41. target_variable = "value",
  42. date_type = "month")
  43. agent <- set_agent_info(project_info = project,
  44. llm = llm,
  45. input_data = hist_data,
  46. forecast_horizon = 6)
  47. # iterate forecast via agent
  48. iterate_forecast(agent_info = agent,
  49. max_iter = 3,
  50. weighted_mape_goal = 0.03)
  51. # load final forecast output
  52. forecast_output <- get_agent_forecast(agent_info = agent)
  53. # ask agent to explain the forecast results
  54. eda_answer <- ask_agent(agent_info = agent,
  55. question = "Summarize the exploratory data analysis, what stands out?")
  56. accuracy_answer <- ask_agent(agent_info = agent,
  57. question = "What's the best model accuracy?")
  58. model_answer <- ask_agent(agent_info = agent,
  59. question = "Explain why the best model was selected. How does that model work?")
  60. ```
  61. ## Contributing
  62. This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit <https://cla.opensource.microsoft.com>.
  63. When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
  64. This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode\@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
  65. ## Trademarks
  66. This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks). Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.
skills/finn/install_skill.ps1 · Bundled script · 129 lines · 1 finding marked
  1. # One-line installer for the Finn skill (Windows PowerShell 5.1 or PowerShell 7).
  2. #
  3. # irm https://raw.githubusercontent.com/microsoft/finnts/main/skills/finn/install_skill.ps1 | iex
    • Note: Runs a downloaded PowerShell script (iex / Invoke-Expression)
    • Line 3 on GitHub
  4. #
  5. # Downloads only the skills/finn folder from GitHub and copies it into your agent's
  6. # personal skills folder. It does not install R or finnts; the skill does that later,
  7. # after asking you. It never deletes or overwrites anything: if the skill is already
  8. # installed it stops and tells you how to update.
  9. #
  10. # Optional environment variables (set them before running the line above):
  11. # FINN_SKILL_AGENT copilot (default), claude, or agents
  12. # FINN_SKILL_DEST exact folder to install into (overrides FINN_SKILL_AGENT)
  13. # FINN_SKILL_REPO GitHub owner/repo (default microsoft/finnts)
  14. # FINN_SKILL_REF branch, tag, or commit (default main)
  15. & {
  16. $ErrorActionPreference = "Stop"
  17. $ProgressPreference = "SilentlyContinue"
  18. try {
  19. [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
  20. } catch {
  21. }
  22. $repo = if ($env:FINN_SKILL_REPO) { $env:FINN_SKILL_REPO } else { "microsoft/finnts" }
  23. $ref = if ($env:FINN_SKILL_REF) { $env:FINN_SKILL_REF } else { "main" }
  24. $agent = if ($env:FINN_SKILL_AGENT) { $env:FINN_SKILL_AGENT.ToLower() } else { "copilot" }
  25. $folders = @{ copilot = ".copilot"; claude = ".claude"; agents = ".agents" }
  26. if ($env:FINN_SKILL_DEST) {
  27. $dest = $env:FINN_SKILL_DEST
  28. } elseif ($folders.ContainsKey($agent)) {
  29. $dest = Join-Path (Join-Path (Join-Path $HOME $folders[$agent]) "skills") "finn"
  30. } else {
  31. Write-Host "Unknown FINN_SKILL_AGENT '$agent'. Use copilot, claude, or agents." -ForegroundColor Red
  32. return
  33. }
  34. if (Test-Path -LiteralPath $dest) {
  35. Write-Host "The Finn skill is already installed at $dest." -ForegroundColor Yellow
  36. Write-Host "To update it, ask your agent: 'Update the Finn skill.'"
  37. Write-Host "(It runs scripts/update_skill.R --action=update, which keeps a backup you can roll back to.)"
  38. return
  39. }
  40. $headers = @{ "User-Agent" = "finn-skill"; "Accept" = "application/vnd.github+json" }
  41. Write-Host "Resolving $repo ($ref) to an immutable commit..."
  42. try {
  43. $commit = Invoke-RestMethod -UseBasicParsing -Headers $headers -Uri "https://api.github.com/repos/$repo/commits/$([uri]::EscapeDataString($ref))"
  44. } catch {
  45. Write-Host "Could not resolve the GitHub ref: $($_.Exception.Message)" -ForegroundColor Red
  46. Write-Host "Check your internet connection or proxy, or install manually (see skills/finn/README.md)."
  47. return
  48. }
  49. $sha = [string]$commit.sha
  50. $treeSha = [string]$commit.commit.tree.sha
  51. if ($sha -notmatch "^[0-9a-fA-F]{40}$" -or $treeSha -notmatch "^[0-9a-fA-F]{40}$") {
  52. Write-Host "GitHub did not return valid commit and tree identities. Nothing was installed." -ForegroundColor Red
  53. return
  54. }
  55. Write-Host "Finding the Finn skill files at commit $sha..."
  56. try {
  57. $tree = Invoke-RestMethod -UseBasicParsing -Headers $headers -Uri "https://api.github.com/repos/$repo/git/trees/${treeSha}?recursive=1"
  58. } catch {
  59. Write-Host "Could not read the resolved commit tree: $($_.Exception.Message)" -ForegroundColor Red
  60. Write-Host "Nothing was installed. Try again later."
  61. return
  62. }
  63. if ($tree.truncated) {
  64. Write-Host "GitHub returned a partial file list. Install manually (see skills/finn/README.md)." -ForegroundColor Red
  65. return
  66. }
  67. $prefix = "skills/finn/"
  68. $files = @($tree.tree | Where-Object { $_.type -eq "blob" -and $_.path.StartsWith($prefix) } | ForEach-Object { $_.path.Substring($prefix.Length) })
  69. if ($files.Count -eq 0 -or -not ($files -contains "SKILL.md")) {
  70. Write-Host "No Finn skill found in $repo at $ref." -ForegroundColor Red
  71. return
  72. }
  73. $stage = Join-Path ([IO.Path]::GetTempPath()) ("finn-skill-" + [guid]::NewGuid().ToString("N"))
  74. $i = 0
  75. foreach ($f in $files) {
  76. $i++
  77. Write-Host (" [{0}/{1}] {2}" -f $i, $files.Count, $f)
  78. $target = Join-Path $stage ($f -replace "/", [IO.Path]::DirectorySeparatorChar)
  79. New-Item -ItemType Directory -Force -Path (Split-Path $target -Parent) | Out-Null
  80. $url = "https://raw.githubusercontent.com/$repo/$sha/$prefix$f"
  81. try {
  82. Invoke-WebRequest -UseBasicParsing -Headers @{ "User-Agent" = "finn-skill" } -Uri $url -OutFile $target
  83. } catch {
  84. Write-Host "Download failed for $f : $($_.Exception.Message)" -ForegroundColor Red
  85. Write-Host "Nothing was installed. Try again later."
  86. return
  87. }
  88. }
  89. $requiredFiles = @("SKILL.md", "version.json", "scripts/finn_common.R", "scripts/update_skill.R", "scripts/install_finnts.R", "scripts/run_forecast.R")
  90. foreach ($required in $requiredFiles) {
  91. if (-not (Test-Path -LiteralPath (Join-Path $stage $required))) {
  92. Write-Host "The download is incomplete ($required is missing). Nothing was installed." -ForegroundColor Red
  93. return
  94. }
  95. }
  96. try {
  97. New-Item -ItemType Directory -Force -Path (Split-Path $dest -Parent) | Out-Null
  98. Copy-Item -Recurse -LiteralPath $stage -Destination $dest
  99. } catch {
  100. Write-Host "Copying into $dest failed: $($_.Exception.Message)" -ForegroundColor Red
  101. return
  102. }
  103. foreach ($required in $requiredFiles) {
  104. $stagedFile = Join-Path $stage $required
  105. $installedFile = Join-Path $dest $required
  106. if (-not (Test-Path -LiteralPath $installedFile) -or
  107. (Get-FileHash -Algorithm SHA256 -LiteralPath $stagedFile).Hash -ne
  108. (Get-FileHash -Algorithm SHA256 -LiteralPath $installedFile).Hash) {
  109. Write-Host "The installation at $dest is incomplete or differs from commit $sha ($required)." -ForegroundColor Red
  110. return
  111. }
  112. }
  113. Write-Host ""
  114. Write-Host "Installed the Finn skill from commit $sha at $dest" -ForegroundColor Green
  115. Write-Host "Next steps:"
  116. Write-Host " 1. Start a new chat (or reload your agent) so it finds the skill."
  117. Write-Host " 2. Say: 'Use the Finn skill to give me the Finn tutorial.'"
  118. Write-Host " or: 'Use the Finn skill to forecast <your file>.'"
  119. Write-Host "The agent checks your setup and asks before installing R or finnts."
  120. }
skills/finn/install_skill.sh · Bundled script · 252 lines · 1 finding marked
  1. #!/bin/sh
  2. # One-line installer for the Finn skill (macOS and Linux).
  3. #
  4. # curl -fsSL https://raw.githubusercontent.com/microsoft/finnts/main/skills/finn/install_skill.sh | sh
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 4 on GitHub
  5. #
  6. # Downloads only the skills/finn folder from GitHub and copies it into your agent's
  7. # personal skills folder. It does not install R or finnts; the skill does that later,
  8. # after asking you. It never deletes or overwrites anything: if the skill is already
  9. # installed it stops and tells you how to update.
  10. #
  11. # Optional environment variables:
  12. # FINN_SKILL_AGENT copilot (default), claude, or agents
  13. # FINN_SKILL_DEST exact folder to install into (overrides FINN_SKILL_AGENT)
  14. # FINN_SKILL_REPO GitHub owner/repo (default microsoft/finnts)
  15. # FINN_SKILL_REF branch, tag, or commit (default main)
  16. set -u
  17. repo="${FINN_SKILL_REPO:-microsoft/finnts}"
  18. ref="${FINN_SKILL_REF:-main}"
  19. agent="${FINN_SKILL_AGENT:-copilot}"
  20. if [ -n "${FINN_SKILL_DEST:-}" ]; then
  21. dest="$FINN_SKILL_DEST"
  22. else
  23. case "$agent" in
  24. copilot) dest="$HOME/.copilot/skills/finn" ;;
  25. claude) dest="$HOME/.claude/skills/finn" ;;
  26. agents) dest="$HOME/.agents/skills/finn" ;;
  27. *)
  28. echo "Unknown FINN_SKILL_AGENT '$agent'. Use copilot, claude, or agents." >&2
  29. exit 1
  30. ;;
  31. esac
  32. fi
  33. if [ -e "$dest" ]; then
  34. echo "The Finn skill is already installed at $dest."
  35. echo "To update it, ask your agent: 'Update the Finn skill.'"
  36. echo "(It runs scripts/update_skill.R --action=update, which keeps a backup you can roll back to.)"
  37. exit 0
  38. fi
  39. if command -v curl >/dev/null 2>&1; then
  40. fetch() { curl -fsSL -H "User-Agent: finn-skill" "$1" -o "$2"; }
  41. elif command -v wget >/dev/null 2>&1; then
  42. fetch() { wget -q --header="User-Agent: finn-skill" "$1" -O "$2"; }
  43. else
  44. echo "Neither curl nor wget is available. Install one, or install manually (see skills/finn/README.md)." >&2
  45. exit 1
  46. fi
  47. stage="$(mktemp -d 2>/dev/null || mktemp -d -t finn-skill)"
  48. commit_file="$stage.commit.json"
  49. tree_file="$stage.tree.json"
  50. echo "Resolving $repo ($ref) to an immutable commit..."
  51. # Percent-encode the ref so branch names such as users/me/fix stay one path segment.
  52. encoded_ref="$(printf '%s' "$ref" | LC_ALL=C awk '
  53. BEGIN { for (i = 1; i < 256; i++) ord[sprintf("%c", i)] = i }
  54. { text = (NR > 1 ? text "\n" : "") $0 }
  55. END {
  56. out = ""
  57. for (i = 1; i <= length(text); i++) {
  58. c = substr(text, i, 1)
  59. if (c ~ /[A-Za-z0-9._~-]/) out = out c
  60. else out = out sprintf("%%%02X", ord[c])
  61. }
  62. printf "%s", out
  63. }
  64. ')"
  65. if ! fetch "https://api.github.com/repos/$repo/commits/$encoded_ref" "$commit_file"; then
  66. echo "Could not resolve the GitHub ref. Check your internet connection or proxy, or install manually (see skills/finn/README.md)." >&2
  67. exit 1
  68. fi
  69. identity="$(awk '
  70. { json = json $0 "\n" }
  71. function next_token( c, value, escaped) {
  72. while (pos <= length(json) && substr(json, pos, 1) ~ /[[:space:]]/) pos++
  73. c = substr(json, pos, 1)
  74. if (c == "") {
  75. token_type = ""
  76. token_value = ""
  77. return
  78. }
  79. if (c == "\"") {
  80. pos++
  81. value = ""
  82. escaped = 0
  83. while (pos <= length(json)) {
  84. c = substr(json, pos++, 1)
  85. if (escaped) {
  86. value = value c
  87. escaped = 0
  88. } else if (c == "\\") {
  89. escaped = 1
  90. } else if (c == "\"") {
  91. token_type = "string"
  92. token_value = value
  93. return
  94. } else {
  95. value = value c
  96. }
  97. }
  98. token_type = "invalid"
  99. return
  100. }
  101. if (c == "{" || c == "}" || c == "[" || c == "]" || c == ":" || c == ",") {
  102. pos++
  103. token_type = c
  104. token_value = c
  105. return
  106. }
  107. value = ""
  108. while (pos <= length(json)) {
  109. c = substr(json, pos, 1)
  110. if (c ~ /[[:space:]]/ || c == "{" || c == "}" || c == "[" || c == "]" || c == ":" || c == ",") break
  111. value = value c
  112. pos++
  113. }
  114. token_type = "primitive"
  115. token_value = value
  116. }
  117. function parse_value(path, key, child_path) {
  118. if (token_type == "{") {
  119. next_token()
  120. if (token_type == "}") return 1
  121. while (1) {
  122. if (token_type != "string") return 0
  123. key = token_value
  124. next_token()
  125. if (token_type != ":") return 0
  126. if (path == "" && key == "commit") commit_objects++
  127. if (path == "commit" && key == "tree") tree_objects++
  128. if (path == "" && key == "sha") commit_shas++
  129. if (path == "commit.tree" && key == "sha") tree_shas++
  130. child_path = path == "" ? key : path "." key
  131. next_token()
  132. if (!parse_value(child_path)) return 0
  133. next_token()
  134. if (token_type == "}") return 1
  135. if (token_type != ",") return 0
  136. next_token()
  137. }
  138. }
  139. if (token_type == "[") {
  140. next_token()
  141. if (token_type == "]") return 1
  142. while (1) {
  143. if (!parse_value(path)) return 0
  144. next_token()
  145. if (token_type == "]") return 1
  146. if (token_type != ",") return 0
  147. next_token()
  148. }
  149. }
  150. if (token_type == "string") {
  151. if (path == "sha") commit_sha = token_value
  152. if (path == "commit.tree.sha") tree_sha = token_value
  153. return 1
  154. }
  155. return token_type == "primitive"
  156. }
  157. END {
  158. pos = 1
  159. next_token()
  160. if (!parse_value("")) exit 1
  161. next_token()
  162. if (token_type != "" || commit_objects != 1 || tree_objects != 1 ||
  163. commit_shas != 1 || tree_shas != 1 ||
  164. length(commit_sha) != 40 || commit_sha !~ /^[[:xdigit:]]+$/ ||
  165. length(tree_sha) != 40 || tree_sha !~ /^[[:xdigit:]]+$/) {
  166. exit 1
  167. }
  168. printf "%s %s\n", commit_sha, tree_sha
  169. }
  170. ' "$commit_file")" || {
  171. echo "GitHub did not return an unambiguous commit and tree identity. Nothing was installed." >&2
  172. exit 1
  173. }
  174. set -- $identity
  175. if [ "$#" -ne 2 ]; then
  176. echo "GitHub did not return valid commit and tree identities. Nothing was installed." >&2
  177. exit 1
  178. fi
  179. sha=$1
  180. tree_sha=$2
  181. echo "Finding the Finn skill files at commit $sha..."
  182. if ! fetch "https://api.github.com/repos/$repo/git/trees/$tree_sha?recursive=1" "$tree_file"; then
  183. echo "Could not read the resolved commit tree. Nothing was installed." >&2
  184. exit 1
  185. fi
  186. if grep -q '"truncated": *true' "$tree_file"; then
  187. echo "GitHub returned a partial file list. Install manually (see skills/finn/README.md)." >&2
  188. exit 1
  189. fi
  190. # Put each tree entry on its own line (works for pretty or compact JSON), keep
  191. # blobs, and strip the skills/finn/ prefix. Skill file names contain no spaces.
  192. files="$(tr -d '\n\r' < "$tree_file" | tr '{' '\n' | grep '"type": *"blob"' |
  193. sed -n 's/.*"path": *"skills\/finn\/\([^"]*\)".*/\1/p')"
  194. case "$files" in
  195. *SKILL.md*) ;;
  196. *)
  197. echo "No Finn skill found in $repo at $ref." >&2
  198. exit 1
  199. ;;
  200. esac
  201. total="$(printf '%s\n' "$files" | wc -l | tr -d ' ')"
  202. i=0
  203. skill="$stage/finn"
  204. for f in $files; do
  205. i=$((i + 1))
  206. echo " [$i/$total] $f"
  207. mkdir -p "$skill/$(dirname "$f")"
  208. if ! fetch "https://raw.githubusercontent.com/$repo/$sha/skills/finn/$f" "$skill/$f"; then
  209. echo "Download failed for $f. Nothing was installed. Try again later." >&2
  210. exit 1
  211. fi
  212. done
  213. required_files="SKILL.md version.json scripts/finn_common.R scripts/update_skill.R scripts/install_finnts.R scripts/run_forecast.R"
  214. for required in $required_files; do
  215. if [ ! -f "$skill/$required" ]; then
  216. echo "The download is incomplete ($required is missing). Nothing was installed." >&2
  217. exit 1
  218. fi
  219. done
  220. mkdir -p "$(dirname "$dest")"
  221. if ! cp -R "$skill" "$dest" || [ ! -f "$dest/SKILL.md" ]; then
  222. echo "Copying into $dest failed. Nothing was installed." >&2
  223. exit 1
  224. fi
  225. for required in $required_files; do
  226. if [ ! -f "$dest/$required" ] || ! cmp -s "$skill/$required" "$dest/$required"; then
  227. echo "The installation at $dest is incomplete or differs from commit $sha ($required)." >&2
  228. exit 1
  229. fi
  230. done
  231. echo ""
  232. echo "Installed the Finn skill from commit $sha at $dest"
  233. echo "Next steps:"
  234. echo " 1. Start a new chat (or reload your agent) so it finds the skill."
  235. echo " 2. Say: 'Use the Finn skill to give me the Finn tutorial.'"
  236. echo " or: 'Use the Finn skill to forecast <your file>.'"
  237. echo "The agent checks your setup and asks before installing R or finnts."

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.