DEV Community

Alper San
Alper San

Posted on Originally published at sifting.io

Stock and ETF Data: Market Price, NAV and Returns

AAPL and an ETF can sit beside each other in a watchlist. Both have a price and a chart, but a useful interface needs to explain more than how far the line moved.

A stock represents an ownership interest in a company. An ETF represents an interest in a fund portfolio. That difference affects the information panel, the interpretation of a price and the way a return is calculated.

This guide focuses on those choices. It uses no live investment observations or fund recommendations.

Keep the shared fields, separate the context

Both security types can have a current market price, trading volume and OHLCV bars: open, high, low, close and volume. Those fields can use the same chart component. The surrounding information should follow the instrument.

What the reader needs Stock ETF
Identity Company and selected share class Fund and selected share class
Current value Market price with its timestamp Market price with its timestamp
Historical chart Price history for the stock Price history for the fund's shares
Further context Company reports and reported financials Fund objective, prospectus and portfolio information
Valuation label A share price A market price, distinct from NAV

An ETF is not automatically a broad, diversified fund. Its strategy determines what it owns. The Investor.gov guide to fund characteristics covers the structure and the differences between funds.

A price endpoint also does not establish which other datasets an API provides. Confirm that holdings, fund valuations or company financials are actually available before designing a panel around them.

Market price and NAV answer different questions

A market price tells you the price at which the fund's shares trade. Net asset value, or NAV, is a valuation of the fund's assets after liabilities. Per-share NAV divides that value by the number of fund shares. See the Investor.gov definition.

The two values can differ. A market price above NAV is a premium; a price below NAV is a discount.

An application needs two appropriately timed inputs to show that comparison. It cannot calculate a meaningful current premium by silently treating yesterday's NAV as a current valuation. Store each input's valuation time and source. If a NAV input is unavailable, show that state instead of copying the market price into the NAV field.

Field shown on the screen Meaning to preserve
Market price The supplied price and its own timestamp
NAV per share The fund valuation, valuation date and source
Last refreshed When the application completed its request

A successful HTTP response only proves that the request succeeded. It does not prove that the market was open or that every value in the response was calculated at that moment.

A distribution can change the chart without removing the same amount of value

Consider a hypothetical fund share worth $100. It pays a $2 cash distribution, and its price then stands at $98. Assume no other market movement, fees or taxes.

Item Before After
Value of one share $100 $98
Cash distribution received $0 $2
Combined share value and cash $100 $100

The chart shows a 2% price decline. The simplified combined value has not changed. These are teaching values, not observations from a real fund. Actual market movement can happen at the same time as a distribution.

The Investor.gov bulletin on distributions explains the transfer of value and why distributions are different from performance.

For comparable share units, a close-to-close price return is:

price return = (ending price / starting price) - 1
Enter fullscreen mode Exit fullscreen mode

That formula does not automatically incorporate distributions or reinvestment. A share split also changes the units being compared. For a raw, unadjusted series, account for the changed share units before interpreting the percentage change as a return.

Read the historical endpoint's adjustment policy before calculating. An adjusted close, an unadjusted close and a total-return series are not interchangeable. Do not apply an adjustment again if the series already includes it.

Historical depth belongs to the individual series

A provider can offer decades of stock history without having that depth for every instrument. A fund launched five years ago cannot have 25 years of its own traded-share history.

Find the usable range for each series before comparing them. Start where both have observations. If an application shows an older underlying benchmark as additional context, label it as a different series rather than presenting it as the fund's own trading history.

Pagination matters too. A response containing 1,000 rows may be one page of a longer range. Follow the provider's documented cursor rules and keep the selected symbol, dates and interval unchanged while collecting the remaining pages.

A day without a trading session should not become a zero-price candle. Keep missing observations and closed sessions distinct, and give daily bars the timestamp meaning documented by the data source.

Give the reader a clear first screen

For a stock, start with the company, current price, timestamp and price history. For an ETF, start with the fund, current price, timestamp and price history. Then add the appropriate company or fund information from verified datasets.

Label a chart as price history and define any return calculation separately. Keep current prices, fund valuations, historical bars and application refresh times identifiable. The result is a screen that explains what the numbers mean before asking the reader to interpret them.

Top comments (0)