JSPM

finalytics

0.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q46490F
  • License MIT

Node.js wrapper for finalytics Rust library using FFI

Package Exports

  • finalytics
  • finalytics/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (finalytics) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Finalytics

NPM Version License Homepage Platform


Finalytics JavaScript Binding

Finalytics is a high-performance JavaScript (ESM) binding for the Finalytics Rust library, designed for retrieving financial data, security analysis, and portfolio optimization.
It provides a fast, modular interface for advanced analytics, and powers dashboards and applications across platforms.


πŸš€ Installation

To install the Finalytics JavaScript binding, add it to your Node.js project using:

npm install finalytics

After installing the library, download the required native binary by running:

curl -O https://raw.githubusercontent.com/Nnamdi-sys/finalytics/refs/heads/main/js/download_binaries.sh
bash download_binaries.sh

πŸ“¦ Main Modules

Finalytics JavaScript exposes four core modules for financial analytics:

1. Screener

Efficiently filter and rank securities (equities, crypto, etc.) using advanced metrics and custom filters.

Usage Example:

import { Screener } from 'finalytics';

const screener = await Screener.new(
  'EQUITY',
  [
    JSON.stringify({ operator: 'eq', operands: ['exchange', 'NMS'] }),
    JSON.stringify({ operator: 'gte', operands: ['intradaymarketcap', 10000000000] }),
  ],
  'intradaymarketcap',
  true,
  0,
  10
);

await screener.display();

2. Ticker

Analyze a single security in depth: performance, financials, options, news, and more.

Usage Example:

import { TickerBuilder } from 'finalytics';

const ticker = await new TickerBuilder()
  .symbol('AAPL')
  .startDate('2023-01-01')
  .endDate('2024-12-31')
  .interval('1d')
  .benchmarkSymbol('^GSPC')
  .confidenceLevel(0.95)
  .riskFreeRate(0.02)
  .build();

for (const reportType of ['performance', 'financials', 'options', 'news']) {
  const report = await ticker.report(reportType);
  await report.show();
}
ticker.free();

3. Tickers

Work with multiple securities at onceβ€”aggregate reports, batch analytics, and portfolio construction.

Usage Example:

import { TickersBuilder } from 'finalytics';

const symbols = ['NVDA', 'GOOG', 'AAPL', 'MSFT', 'BTC-USD'];
const tickers = await new TickersBuilder()
  .symbols(symbols)
  .startDate('2023-01-01')
  .endDate('2024-12-31')
  .interval('1d')
  .benchmarkSymbol('^GSPC')
  .confidenceLevel(0.95)
  .riskFreeRate(0.02)
  .build();

const report = await tickers.report('performance');
await report.show();
tickers.free();

4. Portfolio

Optimize and analyze portfolios using advanced objective functions and constraints.

Usage Example:

const symbols = ['NVDA', 'GOOG', 'AAPL', 'MSFT', 'BTC-USD'];
const portfolio = await new PortfolioBuilder()
  .symbols(symbols)
  .benchmarkSymbol('^GSPC')
  .startDate('2023-01-01')
  .endDate('2024-12-31')
  .interval('1d')
  .confidenceLevel(0.95)
  .riskFreeRate(0.02)
  .objectiveFunction('max_sharpe')
  .build();

const report = await portfolio.report('performance');
await report.show();
portfolio.free();

πŸ“š Documentation


πŸ—‚οΈ Multi-language Bindings

Finalytics is also available in:


Finalytics β€” Modular, high-performance financial analytics for JavaScript.