0.20.0 • Published 4 months ago

strategemizer v0.20.0

Weekly downloads
-
License
-
Repository
github
Last release
4 months ago

THIS PROJECT IS NO LONGER MAINTAINED

Strategemizer

A TypeScript based trading strategy tester, providing the ability to test user-defined strategies on user-defined blocks of history.

Disclaimer

Although this is a public, "open-source" project - I have no goal to maintain this for broad consumption at this time. It's primarily a personal project, and secondarily open to the public... but will try to keep others in mind who are also using it when I make any major changes. The documentation will stay pretty limited. There will be frequent breaking changes for now. The actual test runner functionality will provide results of strategies, and although the point of this project is to attempt to have tests accurataly reflect reality, I take no responsibility of its accuracy.

Pre-requisites

  • JavaScript / TypeScript experience
  • An Alpaca account

What this project is

  • A private pet project turned public. Best practice was not at top of mind when building this out and originally was not based in TypeScript (so, code that was ported over is loosely typed).
  • A work-in-progress fun project that works with "real world" data.
  • A CLI that utilizes ts-node runtime.
  • Free for anyone to use at their own risk.

What this project is not

  • This project does not promise future outcomes.
  • This project should not be used professionally to steer trading strategies. I've used it as a way to get some kind of insight into strategies before running them in a "paper trading" environment.

Usage

For available options see either of the below files (CLI vs module).

Environment Varables (by Example)

ALPACA_BASE_URL='https://paper-api.alpaca.markets' \
ALPACA_BASE_URL_DATA='https://data.alpaca.markets' \
ALPACA_API_KEY_ID='abcd' \
ALPACA_SECRET_KEY='efgh' \
MAIN_OUTPUT_DIRECTORY='./output' \
LOG_LEVEL=verbose

Usage: as an NPM Module

Note: Requires ESM support

import strategemizer from 'strategemizer';

strategemizer({
  start: '2022-12-05T13:30:00Z',
  end: '2022-12-09T20:00:00Z',
  strategyConfigKey: 'a',
  strategyKey: 'bullishEngulfing',
  symbolsKey: 'sAndP500',
  maxLoops: 20,
});

Usage: From this Project

Create the following files, modeling after the sibling .example.ts files.

  • ./src/strategies/index.ts
  • ./src/symbols/index.ts
npm run strategemizer -- \
  --start "2022-12-05T13:30:00Z" \
  --end "2022-12-09T20:00:00Z" \
  --strategy-config-key "a" \
  --strategy-key "bullishEngulfing" \
  --symbols-key "sAndP500" \
  --max-loops 20
0.20.0

4 months ago

0.19.8

1 year ago

0.19.9

1 year ago

0.19.0

1 year ago

0.19.1

1 year ago

0.17.3

1 year ago

0.19.2

1 year ago

0.19.3

1 year ago

0.19.4

1 year ago

0.19.5

1 year ago

0.19.6

1 year ago

0.19.7

1 year ago

0.13.0

1 year ago

0.15.0

1 year ago

0.15.1

1 year ago

0.17.0

1 year ago

0.15.2

1 year ago

0.17.1

1 year ago

0.14.0

1 year ago

0.14.1

1 year ago

0.16.0

1 year ago

0.19.10

1 year ago

0.12.6

1 year ago

0.12.5

1 year ago

0.12.4

1 year ago

0.12.3

1 year ago

0.12.1

1 year ago

0.12.0

1 year ago

0.11.0

1 year ago

0.10.1

1 year ago

0.10.0

1 year ago

0.9.9

1 year ago

0.9.8

1 year ago

0.9.7

1 year ago

0.9.6

1 year ago

0.9.5

1 year ago

0.9.4

1 year ago

0.9.3

1 year ago

0.9.2

1 year ago

0.9.1

1 year ago

0.9.0

1 year ago

0.8.3

1 year ago

0.8.2

1 year ago

0.8.1

1 year ago

0.8.0

1 year ago

0.7.0

1 year ago

0.6.0

1 year ago

0.5.0

1 year ago

0.4.2

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.3.3

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.3.0

1 year ago

0.2.16

1 year ago

0.2.15

1 year ago

0.2.14

1 year ago

0.2.13

1 year ago

0.2.12

1 year ago

0.2.11

1 year ago

0.2.10

1 year ago

0.2.9

1 year ago

0.2.8

1 year ago

0.2.7

1 year ago

0.2.6

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.0

1 year ago

0.0.15

1 year ago

0.0.14

1 year ago

0.0.13

1 year ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago