Jump to content
  • Stock Chart Mod for Spotfire®


    Version 1.1.0, released October 2021.

    converted-file.png.5a2f699425aeee355bd1d5374e06b24c.png

    The stock chart mod enables the visualization of candlestick and open-high-low-close chart (OHLC) of stock price data to illustrate movements in the price of a financial instrument over time, in combination with an optional trading volume histogram.

    image.thumb.png.8725838842466bc971aee442b4e1d1f3.png

    Data Requirements

    Every mod handles missing, corrupted and/or inconsistent data in different ways. It is advised to always review how the data is visualized.

    To make the stock chart mod work properly, the underlying data must be formatted in a certain way. A data table with at least five columns is required:

    • One column should contain the dates in the price time series.
    • The other four columns require the daily open, high, low and close prices.
    • Volume data is optional.

    Setting Up the Mod

    In our example dataset, we have six columns: Date, Open, High, Low, Close, Volume

    Date Open High Low Close Volume
    2/17/2021 127.489998 128.880005 126.919998 127.830002 63152400
    2/18/2021 127.629997 128.779999 127.449997 128.720001 44891700
    2/19/2021 128.479996 129.029999 128.330002 128.449997 37362400
    2/20/2021 128.619995 129.5 128.050003 129.5 48948400
    2/23/2021 130.020004 133 129.660004 133 70974100
    2/24/2021 132.940002 133.600006 131.169998 132.169998 69228100
    2/25/2021 131.559998 131.600006 128.149994 128.789993 74711700
    2/26/2021 128.789993 130.869995 126.610001 130.419998 91287500
    2/27/2021 130 130.570007 128.240005 128.460007 62014800


    A stock chart can be configured with the following setting:

    • Time axis: The Date data column
    • Open axis: The Open data column
    • High axis: The High data column
    • Low axis: The Low data column
    • Close axis: The Close data column

    Optionally we could also use the volume column to show historical trading volumes:

    • Volume axis: The Volume data column.

    Configuring the Mod

    Once the stock chart is configured and has data provided, you can alter the rendering of the visualization live. Alt-click the plot to access the settings.

    Chart Type

    • Candle Sticks: Display the open and close via left and right facing horizontal lines.
    • OHLC: Show the open and close via a real body.

    Log Scale

    Display data over a very wide range of values in a compact way.

    Show Volume

    Add an histogram showing historical trading volumes over time.

    Using the Mod

    This visual and interactive representation of stock price data can be panned, zoomed and filtered. This mod does not support marking within the visualization so set the Marking property to (None).

    Building the Project

    In a terminal window:

    • npm install
    • npm start

    In a new terminal window:

    • npm run server

    Help and Support

    This Mod is not supported by Spotfire® Support.
    In the event of issues or to suggest features and enhancements, submit an issue in the Mod's GitHub repository.
    For general questions about Mods, please post a question in the Forum for Extensions & Mods to make it visible and routed to the appropriate team(s) to respond.

    More Information About Spotfire® Mods


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...