Package 'pathlit'

Title: An SDK for the PathLit Engine
Description: This wrapper houses PathLit API endpoints for R. The usage of these endpoints require the use of an API key which can be obtained at <https://www.pathlit.io/docs/cli/>.
Authors: Riasat Ali Istiaque [aut, cre, ctb], Nicolas Mas [ctb, rev]
Maintainer: Riasat Ali Istiaque <[email protected]>
License: GPL (>= 3)
Version: 0.1.0
Built: 2024-11-13 03:43:12 UTC
Source: https://github.com/cran/pathlit

Help Index


Client

Description

Sets up client access.

Usage

Client(apiKey)

Arguments

apiKey

A character string containing the API key.

Value

Returns the status of the local API key registration.

Author(s)

Riasat Ali Istiaque, [email protected]

Examples

## Not run: 
Client("56gIvzm4dj1vJpNUlv3RJ2CeMd47JETG3bcf5zLS")

## End(Not run)

Get Information

Description

Obtains the current version of the PathLit Engine. See https://www.pathlit.io/docs/api/info/ for more information.

Usage

get_info()

Value

Returns a message indicating PathLit Engine version number.

Author(s)

Riasat Ali Istiaque, [email protected]

Examples

## Not run: 
get_info()

## End(Not run)

Get Paths

Description

Computes the dollar returns of a 100,000 USD portfolio according to the weights computed by get_weights. See https://www.pathlit.io/docs/api/paths/ for more information.

Usage

get_paths(tickers)

Arguments

tickers

A character vector of instrument tickers.

Value

Returns a time series of dollar movements across the strategies for the tickers provided.

Author(s)

Riasat Ali Istiaque, [email protected]

Examples

## Not run: 
get_paths(c("AAPL", "HOG", "KO"))

## End(Not run)

Get Time Series

Description

Retrieves the character vector of available tickers. The time series of these tickers can be retrieved via get_timeseries. See https://www.pathlit.io/docs/api/paths/ for more information.

Usage

get_tickers()

Value

Returns a character vector of the available tickers.

Author(s)

Riasat Ali Istiaque, [email protected]

Examples

## Not run: 
get_tickers()

## End(Not run)

Get Time Series

Description

Retrieves the time series of the tickers provided. The comprehensive list of the tickers can be retrieved via get_tickers. See https://www.pathlit.io/docs/api/paths/ for more information.

Usage

get_timeseries(tickers)

Arguments

tickers

A character vector of instrument tickers.

Value

Returns a time series of the tickers provided.

Author(s)

Riasat Ali Istiaque, [email protected]

Examples

## Not run: 
get_timeseries(c("AAPL", "MSFT"))

## End(Not run)

Get Weights

Description

Computes the weights to be allocated for a portfolio, under different strategies. See https://www.pathlit.io/docs/api/weights/ for more information.

Usage

get_weights(tickers)

Arguments

tickers

A character vector of instrument tickers.

Value

Returns a table of weights across the strategies for the tickers provided.

Author(s)

Riasat Ali Istiaque, [email protected]

Examples

## Not run: 
get_weights(c("AAPL", "HOG", "KO"))

## End(Not run)

Global Variables

Description

Contains global variables used throughout the package.

Usage

PROD_HOST

Format

An object of class character of length 1.

Author(s)

Riasat Ali Istiaque, [email protected]


Simulate

Description

Computes the dollar returns of a 100,000 USD portfolio according to the weights computed by get_weights, but across simulated (normally-distributed) market data. See https://www.pathlit.io/docs/api/sims/ for more information.

Usage

Simulate(tickers, run_count = 10)

Arguments

tickers

A character vector of instrument tickers.

run_count

Defaults to 10 runs. An integer defining the number of simulated market data universes.

Value

Returns a list of multiple time series' of dollar movements across the strategies for the tickers provided.

Author(s)

Riasat Ali Istiaque, [email protected]

Examples

## Not run: 
Simulate(c("AAPL", "HOG", "KO"), 5)

## End(Not run)