# Ratio and Difference Symbols

## Ratio Symbols (Relative Strength) <a href="#ratio_symbols_relative_strength" id="ratio_symbols_relative_strength"></a>

Often, it can be useful to study the ratio of two datasets to determine things like the relative strength of a stock compared to an index. StockCharts users can create ratios from two ticker symbols in our database.  On our website, wherever you can enter a single ticker symbol, you can also enter two symbols joined together with a colon character (“:”), and we will use the ratio of those two symbols. We call such a combination of symbols a “Ratio Symbol.”

Here is an example of a ratio symbol in use:

<figure><img src="https://2414490151-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FELJo6JImRKx7nLaFjAPl%2Fuploads%2FHWbVaiZD16mp5JNmF8LL%2Fimage.png?alt=media&#x26;token=771a3311-59c6-4b17-ab82-f8155f48289e" alt=""><figcaption></figcaption></figure>

People can use ratio symbols to create what is sometimes called the “**Price Relative line,**” the ratio of a stock against the S\&P 500 Large Cap Index. For example, charting AAPL:$SPX will show you the Price Relative line for Apple Inc.

Ratio symbols are also used to create “**Relative Strength**” charts, which plot the ratio of two ticker symbols on a line chart. The following rules are used to interpret a relative strength chart:

* The actual values for each point on the relative strength line are not relevant. Instead, focus on the direction and shape of the line.
* If the line is rising, the first ticker symbol is outperforming the second ticker symbol.
* If the line is falling, the second ticker symbol is outperforming the first.

On a SharpChart, the “Price” indicator can be used to add a ratio symbol to an existing chart.

**Calculation:**\
For purposes of consistency and data integrity, we use the following formulas when calculating a ratio symbol:

1. Open = Open of the first symbol / Close of the second symbol
2. High = High of the first symbol / Close of the second symbol
3. Low = Low of the first symbol / Close of the second symbol
4. Close = Close of the first symbol / Close of the second symbol
5. Volume = Volume of the first symbol / Volume of the second symbol

These formulas ensure that the ratio symbol's High value is still the highest and its Low value is still the lowest in the resulting dataset.

## Difference Symbols <a href="#difference_symbols" id="difference_symbols"></a>

Similar to ratio symbols (see above), you can join two ticker symbols with a hyphen to create a “Difference Symbol,” e.g., $TYX-$FVX.

On a SharpChart, the “Price” indicator can be used to add a Difference Symbol to an existing chart.

**Calculation:**

1. Open = Open of the first symbol - Close of the second symbol
2. High = High of the first symbol - Close of the second symbol
3. Low = Low of the first symbol - Close of the second symbol
4. Close = Close of the first symbol - Close of the second symbol

## Additional Resources <a href="#additional_resources" id="additional_resources"></a>

### Videos <a href="#videos" id="videos"></a>

* [Ratio Ticker Symbols](https://www.youtube.com/watch?v=cSMDt2qicXI)
