Coefficient of Determination R Squared

Author: Optuma Team Last updated: Feb 1, 2023 10:45
Included in Trader Services Included in Professional Services Included in Enterprise Services

Overview

R Squared (r²) is more correctly termed “The Coefficient of Determination” and is simply the square of the correlation. It is one of the components derived from regression analysis between a security and an index. You can read more about regression analysis here.

It essentially tells us the same thing as correlation –how tightly the security moves with the index–but because it is squared, we no longer have negative values to consider. In statistical analysis, r² tells us how significant our results are. In our regression analysis it is telling us the strength of the relationship without considering the direction of the relationship. r² results range from 0 (no significance) to 1 (highly significant).

r² is less commonly used in finance. Is it also simple to calculate by squaring the correlation.

Note: Regression Analysis on securities is typically performed on the percentage changes in their respective prices. This is calculated using natural logarithms in line with standard financial practices. Our tools do have the option of using price–instead of percentage change–for analysis of datasets. This is so the functions can be used on derived datasets which are already detrended.

MASRSQRD Large
To add the tool to your chart, select the tool from the Statistical tool group, and left-click on the chart to add the tool. Optuma will then draw the tool in a window below the chart using the default settings.

Scripting Function: RSQRD()

Actions & Properties

Actions

Actions

Copy Data to Clipboard: Will copy the tool’s values to the clipboard which can then be inserted into a spreadsheet, for example, allowing for further analysis.

Add to Toolbar: Adds the selected tool to your custom toolbar.

Apply Settings to All: When multiple Coefficient of Determination (r²) tools have been applied to a chart, page or workbook, this action can be used to apply the settings of the one selected to other instances of the tool. This is a great time saver if an adjustment is made to the tool - such as line colour - as this allows all the other Coefficient of Determination (r²) tools in the chart, page or entire workbook to be updated instantly.

Copy Tool: Allows you to copy the selected tool, which can then be pasted onto a different chart window.

Move to Back: If the tool is displaying in front of other tools or indicators clicking this action will move the tool view to the background.

Move to Front: If the tool is displaying behind other tools or indicators on the chart, clicking this action will bring the tool to the forefront.

Restore Default Settings: Click this action if you have adjusted the default settings of the tool, and wish to return to the standard properties originally installed with Optuma.

Save Settings as Default: If you have adjusted any of the tool’s properties (colour, for example) you can save the adjustments as your new default setting. Each time you apply a new Coefficient of Determination (r²) to a chart, the tool will display using the new settings.

Delete: Deletes the tool from the chart.

Properties

Properties

Tool Name: Allows you to adjust the name of the tool, as it’s displayed in the Structure Panel.

Calculate On: Allows you to set what time frame the tool is calculated on. You can choose between Day, Week, Month, Year.

Years: Increase or decrease the number of years, can be set to a value of 1 to 10.

Calculation Style:** New to Optuma 1.6. Allows you to adjust what the tool uses in its calculations. You can choose between % Change and Price.

Comparison Index: Use this property to select the benchmark you wish to compare the tool to.

Plot Style: This option expands to display the following:

  • Plot Style - Allows you to adjust the display style for the tool. There are 8 options available: Line, Dot, Histogram, Step, Shaded, Shaded Step, Bars, Candles.
  • Line Style - When the Plot Style is set to Line, Histogram, Step, or Shaded Step, this property allows you to adjust the type of line displayed. There are 8 options available: Solid, Dots, Dash, Dash Dots, Long Dash, Long Dash Dot, Long Dash Dot Dot, Stippled.
  • Line Width - Allows you to adjust the width of the line for the tool. Moving the slider bar to the right increases the thickness of the line.
  • Colour Scheme - Allows you to choose between the following colour schemes for the tool: Copy Colours from Price Chart, Single Colour, Positive / Negative, Custom.
  • Line Colour - When the Colour Scheme is set to Single Colour, this property allows you to adjust the colour of the line. Clicking on the drop down arrow will display a colour swatch. Locate the desired colour and left-click it once to select it.
  • Positive - When the Colour Scheme is set to Positive/Negative, this property allows you to adjust the colour of the tool when it is above the Positive / Negative Barrier. Clicking on the drop down arrow will display a colour swatch. Locate the desired colour and left-click it once to select it.
  • Negative - When the Colour Scheme is set to Positive / Negative, this property allows you to adjust the colour of the tool when it is below the Positive / Negative Barrier. Clicking on the drop down arrow will display a colour swatch. Locate the desired colour and left-click it once to select it.
  • Positive / Negative Barrier - When the Colour Scheme is set to Positive / Negative, this property allows you to adjust the barrier value. The default value is 0.00.
  • Custom Colour Scripts - When the Colour Scheme is set to Custom, this property allows you to set the colour of the tool according to your scripts. For more information on this, please click here. Clicking on the drop down arrow will display a colour swatch. Locate the desired colour and left-click it once to select it.
  • Fill Up / Down Barrier - When the Plot Style is set to Shaded, this property allows you to adjust the barrier value. The default value is 0.00.
  • Fill Up Colour - When the Plot Style is set to Shaded, this property allows you to adjust the fill colour of the tool when it is above the Fill Up / Down Barrier. Clicking on the drop down arrow will display a colour swatch. Locate the desired colour and left-click it once to select it.
  • Fill Down Colour - When the Plot Style is set to Shaded, this property allows you to adjust the fill colour of the tool when it is below the Fill Up / Down Barrier. Clicking on the drop down arrow will display a colour swatch. Locate the desired colour and left-click it once to select it.
  • Fill Transparency - When the Plot Style is set to Shaded, use this slider bar to adjust the transparency of the filled portion of the tool. Moving the slider to the left will increase the transparency.

Offset: Moves the tool forward or backwards in time. The offset is measured in bars, so a value of 2 will push the tool forward 2 bars and -2 will move the tool back 2 bars.

Tool Transparency: Use this slider bar to adjust the transparency of the tool. Moving the slider to the left will increase the transparency of the tool.

Visible: Un-tick this checkbox to hide the tool from the chart.

Show In Price Scale: When selected the current Coefficient of Determination (r²) value will be displayed in the Price Scale.

Discussion