Liking cljdoc? Tell your friends :D

clojure-backtesting.evaluate


benchmark-statsclj

(benchmark-stats permno)

Compares the portfolio with security permno of the main dataset (an index or ETF, say) over the run so far, on the days both have a value: {:days :portfolio-return :benchmark-return :excess-return :beta :alpha :correlation :tracking-error :information-ratio}. Returns are total returns over the period as fractions; the benchmark's comes from its adjusted price, so it includes dividends. :alpha (zero risk-free rate), :tracking-error and :information-ratio are annualised from daily log returns. nil with fewer than two common days.

Compares the portfolio with security `permno` of the main dataset (an
index or ETF, say) over the run so far, on the days both have a value:
{:days :portfolio-return :benchmark-return :excess-return :beta :alpha
:correlation :tracking-error :information-ratio}. Returns are total
returns over the period as fractions; the benchmark's comes from its
adjusted price, so it includes dividends. :alpha (zero risk-free rate),
:tracking-error and :information-ratio are annualised from daily log
returns. nil with fewer than two common days.
sourceraw docstring

get-daily-returnsclj

(get-daily-returns)

This function returns a collection of daily returns from 'portfolio-value'.

This function returns a collection of daily returns from 'portfolio-value'.
sourceraw docstring

max-drawdownclj

(max-drawdown)

This function returns the maximum drawdown: the largest peak-to-trough decline of the portfolio total value, as a fraction of the peak.

This function returns the maximum drawdown: the largest peak-to-trough
decline of the portfolio total value, as a fraction of the peak.
sourceraw docstring

pnl-per-tradeclj

(pnl-per-trade)

The profit/loss per trade in dollars: total profit over the number of orders the strategy placed, not counting those end-order places to close positions.

The profit/loss per trade in dollars: total profit over the number of
orders the strategy placed, not counting those end-order places to
close positions.
sourceraw docstring

portfolio-daily-retclj

(portfolio-daily-ret)

This function returns the current daily return of the portfolio.

This function returns the current daily return of the portfolio.
sourceraw docstring

portfolio-totalclj

(portfolio-total)

This function returns the current total value of the portfolio.

This function returns the current total value of the portfolio.
sourceraw docstring

portfolio-total-retclj

(portfolio-total-ret)

This function returns the current total return of the portfolio.

This function returns the current total return of the portfolio.
sourceraw docstring

rolling-sharpe-ratioclj

(rolling-sharpe-ratio)

This function returns the annualised sharpe ratio over the rolling time window.

This function returns the annualised sharpe ratio over the rolling time window.
sourceraw docstring

ROLLING-TIME-WINDOWclj

source

rolling-volatilityclj

(rolling-volatility)

The volatility of the portfolio over the rolling time window, as a fraction (the formatted report shows it in %).

The volatility of the portfolio over the rolling time window, as a
fraction (the formatted report shows it in %).
sourceraw docstring

sharpe-ratioclj

(sharpe-ratio)

This function returns the annualised sharpe ratio of the portfolio.

This function returns the annualised sharpe ratio of the portfolio.
sourceraw docstring

TRADING-DAYS-PER-YEARclj

source

update-eval-reportclj

(update-eval-report)

This function updates the evaluation report.

This function updates the evaluation report.
sourceraw docstring

update-rolling-windowclj

(update-rolling-window n)

This functions updates the time window for rolling functions.

This functions updates the time window for rolling functions.
sourceraw docstring

volatilityclj

(volatility)

The volatility of the portfolio: sample standard deviation of all daily log returns so far, as a fraction (the formatted report shows it in %).

The volatility of the portfolio: sample standard deviation of all daily
log returns so far, as a fraction (the formatted report shows it in %).
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close