A command line financial data tool built during my internship at Merrill Lynch, featuring FactSet FQL querying, a safe formula evaluation engine, and Excel reporting.
I built ML-Ticker as an internal Python command line application for equity research workflows, allowing analysts to retrieve FactSet market data, define custom financial metrics through configuration files, and export formatted reports to terminal tables and styled Excel workbooks.
Building internal research tools requires validating user configurations and mathematical expressions up front so errors are caught before making expensive data queries.
During my summer internship with Merrill Lynch Wealth Management, I worked on software supporting an internal calculations platform used for portfolios managing more than $500M in assets. Analysts frequently needed to pull fundamental data and historical pricing from FactSet, apply team-specific valuation formulas, and generate clean reports for review. Because this was proprietary internal software, the source code is private, but the architectural design provides a good example of how to build reliable data processing tools.
I built ML-Ticker as a packaged Python command line utility running within FactSet's programmatic environment. The tool reads configuration files written in YAML, checks that all requested metrics and custom formulas are valid, batches remote API queries efficiently, and exports the final calculations into colored terminal tables and multi-sheet Excel workbooks.
One of the central requirements was giving analysts the flexibility to write custom mathematical formulas without opening security vulnerabilities through unsafe Python evaluation. To solve this, I wrote a custom expression validator using Python's abstract syntax tree module. The parser inspects every formula against an allowlist of approved mathematical operators and built-in functions, rejecting attribute lookups, imports, or arbitrary code before anything executes.
Because formulas often build on top of other calculated figures, the application treats the entire metric set as a directed acyclic graph. Before any data is requested from FactSet, the engine computes the topological sort order for evaluation, checks for circular references, and suggests corrections if an analyst misspelled a metric name. This ensures that expensive network requests are never made for invalid configuration files.
Financial data feeds often contain missing values, partial historical dates, or inconsistent data types across different market sectors. If an API returns an empty field, naively coercing it to zero can distort valuation multiples and create misleading spreadsheet results. ML-Ticker treats missing values as explicit typed placeholders throughout the calculation pipeline, ensuring that division by zero or absent data points propagate clearly into the final report.
Once all metrics are computed, the tool formats output depending on the analyst's workflow. Quick lookups display clean terminal tables using the Rich library, while in-depth reviews export styled Excel workbooks with separate sheets for raw data, intermediate calculations, and final presentation summaries, saving the team hours of manual spreadsheet formatting each week.