Liking cljdoc? Tell your friends :D

clojure-backtesting.data


->doubleclj

(->double x)

Coerces a number or a numeric string to a double. Returns nil for nil or a blank string, so optional columns the preprocessor left as strings can be read without knowing their type.

Coerces a number or a numeric string to a double. Returns nil for nil or
a blank string, so optional columns the preprocessor left as strings can
be read without knowing their type.
sourceraw docstring

add-aprcclj

(add-aprc dir headers data-files)

Data augmentation of adding aprc to each file

Data augmentation of adding aprc to each file
sourceraw docstring

add-aprc-fileclj

(add-aprc-file data price-index ret-index security-index)

Appends INIT-PRICE, APRC and CUM-RET to every row of one daily file. CUM-RET is the cumulative natural-log return since the security's first appearance (0.0 on that first day), so APRC = INIT-PRICE * exp(CUM-RET) and APRC(t) / APRC(t-1) = 1 + RET(t). Per-security state lives in the initial-price and cum-ret atoms, which add-aprc resets.

Appends INIT-PRICE, APRC and CUM-RET to every row of one daily file.
CUM-RET is the cumulative natural-log return since the security's first
appearance (0.0 on that first day), so APRC = INIT-PRICE * exp(CUM-RET)
and APRC(t) / APRC(t-1) = 1 + RET(t). Per-security state lives in the
`initial-price` and `cum-ret` atoms, which `add-aprc` resets.
sourceraw docstring

cache-queueclj

source

cum-retclj

source

data-cacheclj

source

data-filesclj

source

data-files2clj

source

decode-filenameclj

(decode-filename filename)
source

decode-strclj

(decode-str s)
source

decoderclj

source

get-file-dateclj

(get-file-date file)

The date a grouped data file holds, decoded from its name.

The date a grouped data file holds, decoded from its name.
sourceraw docstring

group-file-nameclj

(group-file-name date)

The name clojask gives a date's file: the base64url of the EDN group key.

The name clojask gives a date's file: the base64url of the EDN group key.
sourceraw docstring

headersclj

source

headers2clj

source

initial-priceclj

source

load-datasetclj

(load-dataset dir name & [func])
source

meanclj

(mean xs)

Arithmetic mean of a non-empty sequence of numbers.

Arithmetic mean of a non-empty sequence of numbers.
sourceraw docstring

sample-sdclj

(sample-sd xs)

Sample standard deviation (n-1 denominator); 0.0 for fewer than two values.

Sample standard deviation (n-1 denominator); 0.0 for fewer than two values.
sourceraw docstring

update-by-keysclj

(update-by-keys map keys f)

Update values in a map by applying function (f) on keys

Update values in a map by applying function (f) on keys
sourceraw docstring

write-grouped-datasetclj

(write-grouped-dataset dir columns rows-by-date)

Writes a dataset in the layout clojask-script produces: <dir>/header holds the column names and <dir>/grouped one file per date with one EDN vector per row. rows-by-date maps each yyyy-MM-dd date to its rows.

Writes a dataset in the layout clojask-script produces: <dir>/header holds
the column names and <dir>/grouped one file per date with one EDN vector
per row. `rows-by-date` maps each yyyy-MM-dd date to its rows.
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