CloudQuant Charting
CloudQuant Charting is a Python library for creating branded financial visualizations using the CloudQuant Data Liberator API. Import statement:Chart Types
Histogram
Generates distribution/histogram charts with CloudQuant branding. Returns:plotly.graph_objs._figure.Figure
Required arguments:
df- pandas DataFrame containing datacol- string name of column to visualize
title,xlabel,ylabel- support HTML tags like<b>,<i>,<br>histnorm- normalization type:'percent','probability','density', or'probability density'width,height- dimensions in pixels (min 400px)overlay_df,overlay_col- add comparison series
Candlestick
Generates OHLC candlestick charts with optional technical studies and overlays. Returns: Single figure or array of figures (depending on studies) Required arguments:df- DataFrame with OHLC data (minimum 20 bars)
title,xlabel,ylabel- chart labels with HTML supportwidth,height- dimensions (min 700px width, 400px height)open,high,low,close,timestamp- column namesentry_px,entry_time,close_px,close_time,entry_side- trade annotationsoverlay_df,overlay_col,overlay_col2- secondary axis data
BBANDS, DEMA, EMA, HT_TRENDLINE, KAMA, MA, MAMA, MIDPOINT, MIDPRICE, SAR, SAREXT, SMA, T3, TEMA, TRIMA, WMA
Supported Studies (Array of Figures):
ADX, ADXR, APO, AROON, AROONOSC, BOP, CCI, CMO, DX, MACD, MACDEXT, MFI, MINUS_DI, MINUS_DM, MOM, PLUS_DI, PLUS_DM, PPO, ROC, ROCP, ROCR, ROCR100, RSI, STOCH, STOCHF, STOCHRSI, TRIX, ULTOSC, WILLR, ATR, MACDFIX, NATR, TRANGE
Example:
LineChart
Creates line charts with support for studies and secondary Y-axis. Returns:plotly.graph_objs._figure.Figure
Required arguments:
df- pandas DataFramecols- list of column names to plotx_column- column name for X-axis (defaults to index)
title,xlabel,ylabel- chart labels with HTML supportwidth,height- dimensionsy2axis_name- activates secondary Y-axisoverlay_df,overlay_cols- secondary axis datastudy- technical study namestudy_columns- columns for study calculationtimeperiod- study periods
BBANDS, MAMA, DEMA, EMA, HT_TRENDLINE, KAMA, MA, MIDPOINT, MIDPRICE, SAR, SAREXT, SMA, T3, TEMA, TRIMA, WMA
Example:
BarChart
Generates bar charts, including stacked bars for repeated X values. Returns:plotly.graph_objs._figure.Figure
Required arguments:
df- pandas DataFramexcol- column name for X-axisycol- numeric column for Y-axis
title,xlabel,ylabel- labels with HTML supportwidth,height- dimensionssinglecolor- boolean for uniform color (defaultsTrue)orientation-'v'(vertical) or'h'(horizontal)
PieChart
Generates pie/donut charts with customizable hole size. Returns:plotly.graph_objs._figure.Figure
Required arguments:
df- pandas DataFramelabelcol- column name for labelsvaluecol- numeric column for slice size
title- chart title with HTML supportwidth,height- dimensionshole- donut hole size (0-1, where 0 = no hole)colors- color sequence: default CQ palette, or'reds','greens','blues'
GroupedBarChart
Generates grouped bar charts comparing multiple numeric columns. Returns:plotly.graph_objs._figure.Figure
Required arguments:
df- pandas DataFramegroups- column name for groupingvalues- list of numeric column names
title,group_label,value_label- labels with HTML supportwidth,height- dimensionscolors- color list (cycles through bars)orientation-'v'or'h'
ScatterPlot
Generates scatter plots with optional bubble sizing and color coding. Returns:plotly.graph_objs._figure.Figure
Required arguments:
df- pandas DataFramex_column- numeric column for horizontal axisy_column- numeric column(s) for vertical axis
title,xlabel,ylabel- labels with HTML supportwidth,height- dimensionssize_column- numeric column for bubble size (negative values show red/green)size_multiplier- multiplier to adjust bubble sizes
addNotes
Adds annotations/callouts to existing charts for highlighting specific data points. Returns:plotly.graph_objs._figure.Figure
Arguments:
thefig- figure from a CloudQuant charting functionnotes- list of dictionaries withx,y, andnotekeys

