Benchmark

A benchmark is the standard against which the return and risk of an investment are judged, usually a market index or a fund that tracks one. A fund that returned 8% did well if its market returned 5% and badly if it returned 12%, so performance only means something next to the return the investor could have had by simply holding the market. A good benchmark holds the same kind of assets the investment chooses from, so that the difference measures the choices made and not the market they were made in.

Sharpe (1992) showed how to build a benchmark from the style of a fund, the mix of asset classes that best explains its returns, and Roll (1978) that the performance measured against the security market line depends on which index is taken as the market: with another index the same fund can look skilled or unskilled. The choice of benchmark is therefore part of every performance comparison.

The Finance Toolkit uses SPY, the ETF that tracks the S&P 500, as the default benchmark and adds it as a Benchmark column or row to the results of the risk, performance and technical measures. Another ticker can be set as the benchmark ticker when creating the Toolkit, or none to leave it out. The measures that compare a ticker with the benchmark are the Beta, the alpha, the Capital Asset Pricing Model, the Treynor ratio, the tracking error, the information ratio, the R-squared and the up and down capture ratios. The risk-free rate is a separate yardstick, for the excess return over a riskless asset.

Example · AAPL, MSFT, NVDA · 2021 to 2025

Install the Finance Toolkit with pip install financetoolkit -U, then:

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["AAPL", "MSFT", "NVDA"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
    benchmark_ticker="QQQ",
)

toolkit.performance.get_information_ratio(period="yearly")

Which returns:

Item AAPL MSFT NVDA
2021 0.0338 0.1029 0.1203
2022 0.0409 0.0315 -0.0269
2023 -0.0158 0.0139 0.1456
2024 0.016 -0.0499 0.1364
2025 -0.0221 -0.0155 0.0445

References

  • Paper Roll, R. (1978). “Ambiguity When Performance is Measured by the Securities Market Line.” The Journal of Finance, 33(4), 1051-1069.
  • Paper Sharpe, W.F. (1992). “Asset Allocation: Management Style and Performance Measurement.” The Journal of Portfolio Management, 18(2), 7-19.

Updated:

Share