Skip to content

DummyPy Analytics Library

Overview

DummyPy is a small Python analytics library created for educational and testing purposes. It provides a pandas-backed Grid data structure and a set of vanilla European option payoff functions, designed to showcase modern Python development practices.

📚 EDUCATIONAL & DEMONSTRATION PURPOSE This software is created for learning and demonstration purposes. Feel free to use, modify, and distribute.

Documentation Book

The same Rhiza-built documentation book is published to both hosts:

Quick Start

☁️ Instant Development with GitHub Codespaces

Get started immediately with a fully configured cloud development environment:

Open in GitHub Codespaces Coverage

Benefits: - 🚀 Zero Setup - Ready in 2-3 minutes - 🔧 Pre-configured - All tools and dependencies included - 📊 Marimo Notebooks - Interactive analytics environment on port 8080 - 🛡️ Quality Tools - Ruff, pre-commit, and testing ready to use

💻 Local Development

# Clone and enter the repository
git clone git@github.com:markrichardson/dummyrepo.git
cd dummyrepo

# Install the development environment
make install

# Run the test suite and quality checks
make test
make fmt

Core Features

  • Grid (dummypy.Grid): A pandas-backed grid data structure with validated sizing and an element-wise diff() method.
  • Option payoffs (dummypy.call_payoff, dummypy.put_payoff): Vanilla European call and put payoff functions at expiry, working on scalars or array-likes.

Installation & Setup

Quick Start (Linux/macOS)

# Clone the repository
git clone git@github.com:markrichardson/dummyrepo.git
cd dummyrepo

# Run the automated setup
make install

Windows Users

For detailed Windows setup instructions using WSL and VS Code, see INSTALL_WINDOWS.md.

Available Commands

make help          # Show all available commands
make install       # Create development environment
make test          # Run test suite
make fmt           # Run pre-commit hooks and linting
make clean         # Clean up environment

Usage

Grid

A pandas-backed grid of coordinate frames. x is the transpose of y, and diff() returns their element-wise difference as a fresh frame on each call.

Instances are immutable. x and y are derived from n, so allowing any of the three to be reassigned would break the invariants set at construction — build a new Grid instead of mutating one.

from dummypy import Grid

grid = Grid(n=3)  # (n + 1) x (n + 1) coordinate frames

print(grid.x.shape)
print(repr(grid.diff().loc["2", "1"]))  # x - y at those coordinates

# Grid(n=-1) raises ValueError: Grid size n must be non-negative
# grid.n = 5 raises attr.exceptions.FrozenInstanceError - build a new Grid instead
(4, 4)
np.int64(1)

call_payoff / put_payoff

Vanilla European option payoffs at expiry. Both accept a scalar or an array-like of spots, and follow NumPy's own convention for what comes back: a scalar spot yields a np.float64, an array-like yields a float64 array. An invalid strike (negative, NaN or infinite) raises a ValueError.

from dummypy import call_payoff, put_payoff

# A scalar spot yields a np.float64 ...
print(repr(call_payoff(120.0, strike=100.0)))
print(repr(put_payoff(80.0, strike=100.0)))

# ... and an array-like yields a float64 array.
print(repr(call_payoff([80.0, 100.0, 130.0], strike=100.0)))
print(repr(put_payoff([70.0, 100.0, 130.0], strike=100.0)))

# call_payoff(100.0, strike=-1.0) raises ValueError: strike must be non-negative
np.float64(20.0)
np.float64(20.0)
array([ 0.,  0., 30.])
array([30.,  0.,  0.])

Development

For developers working on this project, comprehensive documentation about the CI/CD infrastructure, development workflows, and quality assurance processes is available in GITHUB_CICD_README.md.

This documentation covers: - GitHub Actions workflows for automated testing and deployment - Pre-commit hooks for code quality enforcement - Dependency management with Renovate - GitHub Codespaces cloud development environment - Development workflow commands and best practices

Architecture

  • Grid (dummypy.grid): Example grid data structure built on pandas DataFrames
  • Payoffs (dummypy.payoffs): Vanilla European option payoff functions

License

© 2026 Mark Richardson. Released under MIT License.

This software is provided for educational and demonstration purposes. Feel free to use, modify, and distribute according to the MIT License terms.


Version: 0.2.0 Classification: Public source, MIT licensed — not distributed on PyPI (Private :: Do Not Upload in pyproject.toml)

The release date for each version is in CHANGELOG.md.