Skip to content

Latest commit

Β 

History

History
145 lines (94 loc) Β· 3.82 KB

File metadata and controls

145 lines (94 loc) Β· 3.82 KB

πŸ“„ CONTRIBUTING.md

🀝 Contributing to AlphaQuant

Thank you for your interest in contributing to AlphaQuant β€” the open-source JavaScript framework for quantitative analysis and algorithmic trading.

We welcome contributions of all kinds: code, documentation, examples, bug reports, and suggestions.


🧰 Project Structure

AlphaQuant uses a monorepo structure:

/packages/ core/ # DataFrame & data utilities ta/ # Technical analysis indicators strategy/ # Strategy interfaces and helpers backtest/ # Backtesting engine report/ # Output and metrics formatter

/apps/ cli/ # Node.js CLI tool playground/ # Browser-based playground


πŸš€ Getting Started

  1. Fork the repository on GitHub

  2. Clone your fork locally:

    git clone https://github.com/AlphaQuantJS/alphaquant.git
    cd alphaquant
    npm install
  3. Create a feature branch:

    git checkout -b feature/my-awesome-feature
  4. Make your changes inside the appropriate packages/* or apps/* folder.

  5. Run tests and linting before pushing:

    npm run lint && npm run test
  6. Commit using conventional format (see below)

  7. Push and open a Pull Request to main or dev branch


πŸ“ Coding Standards & Best Practices

AlphaQuant is performance-critical financial software.
Please read our Coding Guidelines to understand:

  • How to write high-performance, V8-optimized JavaScript;
  • Best practices for financial accuracy (avoid rounding errors, use integers/BigInt/etc);
  • Structuring modular code that runs in Node.js and browser;
  • Error handling, testing, and profiling recommendations.

Following these practices ensures code correctness, maintainability, and speed.


βœ… Pull Request Checklist

  • Code compiles and builds successfully
  • Tests are added or updated
  • Linting passes (Prettier/ESLint)
  • No console.logs or debug code left
  • Follows commit message convention (see below)
  • Good description of the changes

🧾 Commit Message Convention

We use Conventional Commits to generate changelogs and version bumps automatically.

Format:

<type>(scope): short description

Examples:

  • feat(ta): add Bollinger Bands indicator
  • fix(backtest): fix division by zero bug
  • docs(core): improve merge() API documentation

Common Types:

Type Purpose
feat A new feature
fix A bug fix
docs Changes to documentation
refactor Code refactoring (no behavior change)
test Adding or modifying tests
chore Other changes (tooling, CI, etc)

πŸ’‘ Commit messages are automatically checked via commitlint and husky.


🐞 Reporting Bugs / Requesting Features

Please use GitHub Issues and choose the appropriate template:

  • Bug Report β€” something isn't working
  • Feature Request β€” suggest a new idea
  • Discussion β€” open-ended question or idea

We tag good beginner tasks as good first issue!


πŸ“š Documentation & Examples

Documentation is located in /docs/ (or README.md in each package). You can also contribute:

  • Code examples for the /examples/ folder
  • Improvements to API docs or tutorials

πŸ’¬ Community & Support

  • Ask questions via GitHub Discussions
  • Follow us on Twitter @AlphaQuantJS
  • Contribute tutorials, videos or content β€” we love it!

Thank you again for contributing to AlphaQuant! πŸ™
Let’s build the future of JavaScript-based quant finance together πŸ’Ή