Financial Computations at Scale

Write serverless financial cloud functions that scale from zero to millions of executions with instant access to all the data you need.

Financial Cloud Functions

Write once, deploy globally, and scale automatically with built-in access to all the financial data you need.

Features

Serverless Financial Computing at Global Scale

Exchange Outpost lets your team write financial cloud functions that scale automatically and have instant access to all the financial data you need.

Zero to Infinite Scale
Functions scale automatically from zero to millions of executions per second with no infrastructure to manage.
Financial Cloud Functions
Write serverless functions that have built-in access to all the data you need.
Integrated Data Access
Every function has secure, high-performance access to all the data you need without complex configuration.
Global Edge Deployment
Deploy your financial functions to our global network for fast execution anywhere in the world.
Elastic Compute
Automatically allocate computing resources based on demand, from a single calculation to millions per second.
Infrastructure Cost Reduction
Dramatically reduce infrastructure costs by only paying for what you use, eliminating the need for expensive dedicated hardware and maintenance.
How It Works

Write once, scale infinitely

Exchange Outpost makes it easy for your team to build financial cloud functions that scale automatically.

1

Automatic Data Access

The data you need is automatically available to all your cloud functions without any configuration or setup.

2

Write Functions

Create serverless financial cloud functions with built-in access to all your data and APIs.

3

Scale Automatically

Your functions scale from zero to millions of executions automatically, with no infrastructure to manage.

Ready to scale your financial computations?

Start building scalable financial computations today.

By signing up, you agree to our Terms & Conditions

Write financial cloud functions in minutes

Get started with our sample templates or build your own custom functions.

mod exchange_outpost;
use crate::exchange_outpost::FinData;
use extism_pdk::{encoding, plugin_fn, FnResult, Json, ToBytes};
use ndarray::Array1;
use serde::Serialize;

#[derive(Serialize, ToBytes)]
#[encoding(Json)]
pub struct Output {
    correlation: f64,
}

/// Calculate the Pearson correlation coefficient between two stock price series
fn pearson_correlation(x: &Array1<f64>, y: &Array1<f64>) -> f64 {
    let x_mean = x.mean().unwrap();
    let y_mean = y.mean().unwrap();

    let numerator = x.iter()
        .zip(y.iter())
        .map(|(&xi, &yi)| (xi - x_mean) * (yi - y_mean))
        .sum::<f64>();

    let denominator_x = x.iter()
        .map(|&xi| (xi - x_mean).powi(2))
        .sum::<f64>()
        .sqrt();

    let denominator_y = y.iter()
        .map(|&yi| (yi - y_mean).powi(2))
        .sum::<f64>()
        .sqrt();

    numerator / (denominator_x * denominator_y)
}

#[plugin_fn]
pub fn run(fin_data: FinData<f64>) -> FnResult<Output> {
    let correlation = pearson_correlation(
        &Array1::from_iter(fin_data.get_candles("symbol_1")?
            .windows(2)
            .map(|w| (w[1].close / w[0].close).ln())),
        &Array1::from_iter(fin_data.get_candles("symbol_2")?
            .windows(2)
            .map(|w| (w[1].close / w[0].close).ln())),
    );
    Ok(Output {correlation})
}