mxls_db_query function

Last Updated On October 02, 2019
You are here:
< Back

This function allows you to query MarketXLS databases with formulas database on our servers to get useful insights about the price & volume.

Function Structure:

=Mxls_db_query(“What Database”, “What Symbol”, “What do you want to query” i.e. Volume, Open, High, Low, Close, Dividend, Split, returns “, “How do you want to aggregate” i.e. sum, average, max, min, variance, standarddeviation, “How far you want to go in days” 1, 100, 200 etc)

The only database which are supported right now are “historical” and “fundamental”

So, to get the minimum low a symbol has moved to in last 100 days, type

=MXLS_DB_Query("historical", "MSFT" , "low", "min", "100")

To get the average of daily returns of a stock in last 100 days, type =mxls_db_query("Historical","msft","returns","average",100)

You can also get and calculate the analytical functions on MarketXLS database and quickly get values like Growth Rate (CAGR), trend, average growth as shown below.

=mxls_db_query("Fundamental","MSFT","eps","growth","5y") this gets the CAGR for 5 years of EPS
=mxls_db_query("Fundamental","MSFT","revenue","trend","5y") this gets the trend, increasing decreasing etc
=mxls_db_query("Fundamental","MSFT","revenue","avggrowth","5y") this gets the average of annual growth rates
=mxls_db_query("Fundamental","MSFT","revenue","sum","5y") this gets the sum