Skip to content
All library documents

QSTrader Asset Classes for Cash and Equity Instruments

Article QuantStart

Summary

The document explains QSTrader’s basic asset class hierarchy for representing instruments in a backtesting system. A generic base class provides a place for future shared behavior, while the described subclasses represent cash and equities. Cash stores its currency and a flag identifying it as cash-like; equity stores a name, ticker symbol, and tax exemption status.

The examples show how this metadata can distinguish uninvested account cash from stocks or ETFs and record whether transaction taxes such as UK stamp duty apply. The equity representation is intended to recreate an asset’s identifying attributes when displayed. The article describes an early, deliberately simple design: it specifies no common interface or ticker mapping, and its two subclasses do not cover more complex instruments such as derivatives. It focuses on data modeling rather than trading rules, backtest results, or a complete brokerage simulation.

Key ideas

  • A base asset class can provide a foundation for adding shared interfaces as a trading system grows.
  • Cash assets store a currency and are marked as cash-like.
  • Equity assets record a name, ticker symbol, and tax exemption setting.
  • Tax metadata can help a backtester account for transaction taxes in relevant regions.
  • The described hierarchy is limited to cash and equities and leaves more complex asset behavior for future development.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.