A small synthetic dataset in the on-disk layout that clojask-script produces, so the examples and the end-to-end tests run without WRDS access. Three securities over the weekdays of January to March 1990:
plus a supplementary Compustat-style dataset with two filing dates for
AAA and BBB only. Prices follow a seeded random walk, so the files are
reproducible: lein run -m clojure-backtesting.sample-data rewrites
resources/sample-data, furnished with the adjusted-price columns.
A small synthetic dataset in the on-disk layout that clojask-script produces, so the examples and the end-to-end tests run without WRDS access. Three securities over the weekdays of January to March 1990: - 10001 AAA pays a $0.50 dividend on 1990-02-15 - 10002 BBB has a 2-for-1 split on 1990-03-01 (CFACPR 2.0 -> 1.0) - 10003 CCC has no rows from 1990-02-05 to 1990-02-09 plus a supplementary Compustat-style dataset with two filing dates for AAA and BBB only. Prices follow a seeded random walk, so the files are reproducible: `lein run -m clojure-backtesting.sample-data` rewrites resources/sample-data, furnished with the adjusted-price columns.
(-main & [dir])Regenerates resources/sample-data (or the given directory), furnished with INIT-PRICE, APRC and CUM-RET so that it can be loaded read-only.
Regenerates resources/sample-data (or the given directory), furnished with INIT-PRICE, APRC and CUM-RET so that it can be loaded read-only.
[PERMNO datadate rdq atq ceqq niq] as strings, the way the preprocessor keeps untyped columns.
[PERMNO datadate rdq atq ceqq niq] as strings, the way the preprocessor keeps untyped columns.
(security-rows {:keys [permno ticker start dividends splits gap]})The main-dataset rows for one security, in trading-day order. RET is the total return since the previous row, so it spans a gap and includes dividends and the split adjustment, exactly as CRSP defines it.
The main-dataset rows for one security, in trading-day order. RET is the total return since the previous row, so it spans a gap and includes dividends and the split adjustment, exactly as CRSP defines it.
Weekdays from 1990-01-02 to 1990-03-30, as yyyy-MM-dd strings.
Weekdays from 1990-01-02 to 1990-03-30, as yyyy-MM-dd strings.
(write-sample-dataset dir)Writes the raw main dataset to <dir>/main and the supplementary dataset to <dir>/compustat. Returns dir. The main dataset still needs add-aprc, which (load-dataset main-dir "main" add-aprc) applies in place.
Writes the raw main dataset to <dir>/main and the supplementary dataset to <dir>/compustat. Returns dir. The main dataset still needs add-aprc, which (load-dataset main-dir "main" add-aprc) applies in place.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |