QM 11 Introduction to Financial Data Science
Every investment decision rests on two kinds of information, and modern analysis increasingly blends them. Quantitative data are numeric: prices and returns, interest and currency exchange rates, accounting figures, and economic indicators, all of which can be processed with quantitative methods. Qualitative data are non-numeric: market sentiment, management quality, industry trends, environmental considerations, and geopolitical factors. Over roughly the past thirty years, digitization has meant that qualitative information is more and more often captured in digital form and processed algorithmically, so qualitative insight can be folded into quantitative analysis and improve both the depth and the accuracy of a decision.
The volume and complexity of this information have grown so large that a dedicated discipline has formed around it. Financial data science pairs statistical methods and machine learning algorithms with computational tools to turn raw financial information into usable insight. The force behind this shift is fintech, the meeting of finance and technology, which has let asset managers apply machine learning (ML) and artificial intelligence (AI) to evaluate opportunities, optimize portfolios, and manage risk. The trend has accelerated as firms embed AI, and generative AI (GenAI) in particular, into everyday business applications.
The core building blocks
Big data refers to the very large volumes of structured and unstructured information generated across financial markets, including transaction records, market movements, and investor behavior, among many other categories. These datasets are the raw material for data science generally and for financial data science specifically. The industry has moved beyond traditional feeds to bring in alternative data: social media sentiment, mobile device information, and satellite imagery, and the combination gives a richer view of market dynamics, investor behavior, asset pricing, and emerging risk.
Data science is an interdisciplinary field that joins statistical methods, mathematical approaches, computational tools, and domain knowledge to organize and interpret big data. It spans the whole pipeline, from collecting and cleaning data through modeling and interpretation, which is what makes the resulting insight both reliable and usable. Financial data science is the branch that applies these principles to financial information such as prices, rates, and returns, accounting and disclosure data, and macroeconomic series. It is worth stressing that doing it well requires domain knowledge: a real grasp of markets, regulation, and the features of specific instruments.
High-frequency data are recorded at extremely short intervals, often milliseconds or microseconds, as with trading and transaction records, and they give a granular view of fast-moving processes that only specialized tools can process. Machine learning is the data science technique in which algorithms are built to learn from data and make predictions, automating work that was once manual, from detecting fraud and pricing transactions to optimizing trading strategies. Artificial intelligence is the broader set of technologies that let computers perform tasks normally associated with human intelligence, such as pattern recognition and decision-making, delivering more accurate and timely insight from real-time data.
What makes financial data distinctive
Financial data are complex, and even small mistakes, whether in the data itself, in data entry, or in model design, can move an outcome sharply. Tools such as sentiment analysis and natural language processing (NLP) can convert qualitative material into quantifiable form so it sits alongside traditional numbers. Beyond that, financial data carry several features that shape how they must be analyzed:
- High volume and speed. Markets produce large quantities of data very quickly.
- Sequential, time-dependent structure. Because values arrive in order and depend on their own history, time-series methods are required.
- Noise and non-stationarity. Noisy data contain random errors, irrelevant content, or inconsistencies that can mask real patterns, and the patterns themselves shift over time.
- Interdependence and non-linearity. Relationships among assets and indicators are often non-linear and can change. Copulas, which are functions that couple a multivariate distribution to its one-dimensional marginal distributions to capture dependence between variables, and neural networks, computational models of interconnected nodes that process data through layers, are used to capture these effects.
- Seasonal and cyclic patterns. Recurring cycles, such as quarterly earnings or shifts between low and high rate environments, can be isolated once a model detects the periodicity.
- Extreme events and fat tails. Returns show fat-tailed distributions in which extreme moves happen more often than a Gaussian distribution predicts, and ignoring this understates risk.
- Sparsity and missing values. In some markets, such as emerging markets, history is thin or incomplete, so missing data must be handled carefully to avoid biased results.
An early form of AI was the expert system, a program that tried to reproduce the knowledge and reasoning of a human specialist in a narrow problem area, usually through if-then rules. Toward the end of the 1990s, stronger networks and faster processors let AI move into logistics, data mining, financial analysis, and medical diagnosis, and financial institutions have made growing use of these tools since the 1980s.
An analyst is assembling inputs for a company model and must sort each item as quantitative or qualitative data. Classify the following: (a) the stock’s daily closing prices, (b) the tone of the chief executive on the latest earnings call, (c) the firm’s reported operating margin, (d) the euro to dollar exchange rate, and (e) the market’s reaction to a geopolitical event.
The term big data has been used since the late 1990s to describe the huge quantities of information produced by industry, governments, individuals, and connected devices. Three characteristics define it. Volume is the sheer amount collected in files, records, and tables, often many millions or billions of data points, growing from megabytes and gigabytes toward terabytes and petabytes. Velocity is the speed at which data arrive, with real-time or near-real-time feeds now the norm in many areas. Variety is the range of sources and formats, spanning structured data such as CSV files or SQL tables, semi-structured data such as HTML, and unstructured data such as video messages.
When big data feed an inference or a prediction, a fourth characteristic matters. Veracity is the credibility and reliability of the sources. Judging whether data can be trusted is part of any empirical study, but it becomes critical with big data because the sources and quality vary so widely. Big data sharpen the old problem of separating quality from quantity.
Three data structures
Structured data can be arranged in tables of rows and columns, are commonly held in a database, and use defined fields that give a basis for organizing and comparing observations. Unstructured data are disparate and unorganized and are typically not tabular, including social media output, email, text messages, voice recordings, pictures, blogs, scanner output, and sensor readings; they usually need specialized applications or custom code before they become useful. Semi-structured data mix the two: they do not fit a tabular format, as with financial news that arrives as a narrative rather than a table, yet they can still be tagged, stored, and organized.
| Source | Examples |
|---|---|
| Financial markets | Equity, fixed income, futures, options, other derivatives, and commodities |
| Businesses | Corporate financial information, commercial transactions, credit card purchases, and customer purchase history |
| Governments | Trade, economic, regulatory, employment, taxation, and payroll data |
| Individuals | Product reviews, internet browsing history, search logs, personal and professional websites, and social media activity |
| Sensors | Satellite imagery, aircraft data, shipping cargo information, and traffic patterns |
| Internet of Things | Streams from smart buildings covering climate control, energy use, security, and other operations |
A data team is cataloguing incoming feeds and must label each as structured, semi-structured, or unstructured data: (a) a SQL table of daily trade prices, (b) a folder of recorded earnings-call audio, (c) a stream of financial news articles tagged with company codes, and (d) a set of customer product-review videos.
Analysts have traditionally drawn on financial statements and accounting figures, using statistics to measure performance and predict growth. Big data analysis adds alternative data, which are collected from non-traditional sources such as social media activity, satellite imagery, web traffic, real-time retail sales, and geolocation. These sources shed light on corporate performance, consumer behavior, and wider economic trends. Satellite imagery, for instance, can gauge agricultural productivity, track shipping, estimate retail sales from the number of cars parked outside malls, and read oil rig activity from flared gas, often with an immediacy that traditional data cannot match.
Alternative data have become central for investors, particularly quantitative investors. Social media and web content support real-time sentiment analysis, online prices can be compared over time to infer real-time inflation and consumption, and the same feeds help monitor supply chains for bottlenecks and disruptions. Alternative data also support environmental impact assessment, letting investors weigh sustainability practices and risks. The three main source categories are set out below.
| Source | Typical structure | Examples and notes |
|---|---|---|
| Individuals | Mostly unstructured | Text, video, photo, and audio, plus website clicks and time on a page; volume is rising fast as online activity grows |
| Business processes | Mostly structured | Credit card purchase history, supply chain records, banking records, and point-of-sale scanner data; often leading or real-time indicators, unlike lagging quarterly metrics |
| Sensors | Often unstructured | Smartphones, cameras, RFID chips, and satellites; volume far exceeds individual or business streams and underpins the Internet of Things |
As interest has grown, so has the number of firms that gather, aggregate, and sell these datasets. Investment professionals should weigh the legal and ethical issues around information that is not public. Web scraping, the automated extraction of data from websites through software tools or scripts, can capture personal information protected by data protection rules or shared without the knowledge and consent of the people involved. Best practice is still developing, and because national regulators take different approaches, the various forms of guidance can conflict.
Big data challenges
Big data raise questions about quality, volume, and fit before any analysis begins. Does the dataset carry selection bias, missing values, or outliers? Is the amount of data sufficient? Is the dataset actually suited to the intended analysis? In most cases the data must first be sourced, cleaned, and organized, which is especially hard with alternative data because they are often unstructured and qualitative, such as text, photos, and videos, and are open to more than one interpretation. Traditional analytical methods cannot always cope, which is why AI and machine learning techniques have stepped in to handle large and complex sources.
A quantitative fund logs four new alternative datasets and wants to file each under the correct source category, individuals, business processes, or sensors: (a) satellite images of retailer parking lots, (b) anonymized credit card purchase histories, (c) product reviews posted on social media, and (d) point-of-sale scanner records from a retail chain.
The aim of a machine learning algorithm is to automate decision-making by generalizing (learning) from known examples so as to uncover the structure in data, ideally without a human specifying that structure in advance. Put simply, the goal is to find the pattern and apply the pattern. In today’s investment setting ML needs large quantities of data for training, and the growth of big data has given algorithms such as neural networks enough material to raise their accuracy. Robo-advisers illustrate the point: they build and continuously rebalance personalized portfolios from a client’s stated goals and risk tolerance.
Data mining is a subset of this work that focuses on finding patterns in large datasets through algorithmic approaches, including the use of Bayes theorem to relate the probability of a pattern given the data to the probability of the data given the pattern, the prior probability of the pattern, and the overall probability of the data.
Training, validation, and testing
Because an algorithm must learn a relationship and then be checked on data it has not seen, ML normally splits the available data into three subsets. The training dataset lets the algorithm identify relationships from historical patterns and is usually the largest. The validation dataset is used to confirm and tune those relationships. The test dataset checks how well the model predicts on new data. Data are typically split at random so that each subset is representative, which reduces bias, limits overfitting, and helps prevent data leakage, where information from outside the training set slips in and distorts the result.
| Situation | Training | Validation | Test |
|---|---|---|---|
| Standard split | 60 to 80 | 10 to 20 | 10 to 20 |
| Larger datasets | 70 to 80 | 10 to 15 | 10 to 15 |
| Smaller datasets | 60 to 70 | 15 to 20 | 15 to 20 |
Time-series data need different handling, because random shuffling breaks the temporal order that gives the data meaning and can introduce leakage by placing future points in the training set while their earlier points sit in validation or test. Two approaches preserve the chronology. Time-based splits divide the data in sequence, so earlier data train the model and later data evaluate it. Rolling-window validation moves a fixed-size window of history forward through time, training on one window and validating on the next. Validation and test sets should also cover at least as many periods as the intended forecast horizon.
Two failure modes matter. Overfitting occurs when the model learns the training and target data too precisely, treating noise as if it were a true parameter, so it predicts poorly on a different dataset. Underfitting is the opposite: the model treats true parameters as noise and fails to recognize the relationships in the training data. Because ML methods are not explicitly programmed, they can also behave as opaque black boxes whose outputs are not fully explainable.
Four classes of machine learning
ML techniques fall into four broad classes.
| Approach | How it learns | Example applications | Key strength | Key limitation |
|---|---|---|---|---|
| Supervised learning | From labeled data where the target output is known, to predict outcomes for new data | Spam detection, stock price prediction, image classification, medical diagnosis | Accurate when trained on enough data; well understood | Needs large labeled datasets; may not generalize to wholly new scenarios |
| Unsupervised learning | Finds patterns and structure in unlabeled data to reveal hidden groupings | Customer segmentation, anomaly detection, feature extraction | Uncovers hidden patterns; can reduce dimensionality | Results can be hard to interpret and evaluation can be subjective |
| Reinforcement learning | Through interaction with an environment, guided by rewards and penalties | Portfolio optimization, autonomous vehicles | Suited to sequential decisions and dynamic settings | Sensitive to poorly designed rewards; heavy on computation and time |
| Deep learning | Uses multi-layered neural networks; can be supervised, unsupervised, or semi-supervised | Image and speech recognition, natural language processing, recommendation systems | Models complex non-linear relationships and extracts features automatically | Needs large data and heavy computation; often a black box; can overfit |
In supervised learning the inputs and outputs are labeled, and the trained algorithm predicts outcomes for new data, for example forecasting whether a market will finish up, down, or flat. In unsupervised learning no labels are provided, and the algorithm describes the data and their structure, for example grouping companies into peer sets from their financial characteristics rather than standard sector labels. In reinforcement learning the algorithm learns by trial and error, receiving rewards or penalties, for example tuning a trading strategy by rewarding actions that improve risk-adjusted returns. In deep learning neural networks with many hidden layers carry out multistage, non-linear processing, each layer extracting progressively more abstract features so that simple concepts inform the analysis of more complex ones.
Inside a neural network
Neural networks have existed since 1958 and are computational models inspired by biological brains, made of interconnected nodes, or neurons, arranged in layers. The input layer receives raw data, with each neuron standing for a feature such as a pixel value. Hidden layers, the intermediate layers, transform and combine the data so that patterns become clearer, and a network with several hidden layers is called deep. The output layer delivers the prediction, whether a classification or a continuous value such as a forecast price. Connections between layers carry weights that adjust as the network learns.
Training relies on backpropagation. In the forward pass, data move through the network to produce an initial prediction, which is compared with the actual outcome. The network then computes a loss, the error between predicted and actual values, and the objective is to minimize it. Backpropagation calculates how each weight affects the error, and gradient descent nudges the weights step by step in the direction that lowers the loss, repeating across many data points and multiple passes, or epochs, until accuracy is satisfactory.
| Backpropagation | Generative adversarial networks | Variational autoencoders | |
|---|---|---|---|
| Purpose | Optimize neural networks | Generate realistic data | Learn latent representations |
| Architecture | Single neural network | Two networks, a generator and a discriminator | Encoder and decoder |
| Type | Supervised learning | Adversarial learning | Probabilistic generative model |
| Applications | Any supervised task, such as classification or regression | Image generation, super-resolution, deepfakes | Latent exploration, anomaly detection |
Generative adversarial networks (GANs) pair a generator with a discriminator to produce realistic synthetic data, which is valuable in finance for augmentation and simulation, for example generating plausible future market scenarios to stress-test a trading strategy. Variational autoencoders (VAEs) squeeze data into a compact form and then reconstruct it, which makes them effective at reducing dimensionality while keeping the essential patterns in large financial datasets.
For each task below, identify the machine learning class that fits best: supervised learning, unsupervised learning, reinforcement learning, or deep learning.
Text analytics uses computer programs to draw meaning from large unstructured text or voice datasets such as company filings, quarterly earnings calls, written reports, email, social media, internet posts, and surveys. It covers automated retrieval of information from unrelated sources as well as more analytical work such as lexical analysis, which measures how often words appear in a document, and pattern recognition around key words and phrases. Applied to prediction, text analytics can flag early signals of future performance, consumer sentiment among them.
Natural language processing lies where computer science, AI, and linguistics meet, and focuses on programs that analyze and interpret human language. Within text analytics it is a central application, handling tasks such as translation, speech recognition, sentiment analysis, text mining, and topic analysis. NLP is also used in compliance to review employee voice and electronic communications for adherence to policy or for signs of misconduct or fraud, and to keep private or customer information confidential.
A common use is decoding corporate sentiment. Public companies generate millions of pages of annual reports each year, plus tens of thousands of hours of earnings calls, more than any analyst can read. NLP, especially when supported by ML, can process reports, transcripts, news, and social media to spot trends faster and at greater scale than a person can, and it can assign sentiment ratings from very negative to very positive. Because analysts rarely change their buy, hold, or sell ratings, NLP can detect subtle shifts in their written commentary ahead of a formal recommendation change, and it can read nuance in central bank communications, such as those of the European Central Bank or the US Federal Reserve, where officials may signal through their choice of topics, words, and tone.
Large language models
Large language models (LLMs), such as GPT (generative pre-trained transformer), are a major advance in AI. Built on neural networks, they read and generate text using the context drawn from vast datasets, with structures such as transformers that handle long-range dependencies, meaning context and meaning, across a passage. Rather than merely predicting the next word, they produce coherent and contextually appropriate sentences and longer material. How well they work in finance rests on training with specialized corpora, which are comprehensive collections of financial texts that let the model grasp precise financial terminology.
Training uses self-supervised learning, in which the model learns from the structure of the data itself rather than from manually labeled examples, first developing general language ability and then mastering domain-specific patterns from annual reports, disclosures, earnings-call transcripts, and market commentary. After initial training, models undergo fine-tuning or transfer learning for specific tasks: generating human-like financial reports or summaries, condensing large volumes of data, assessing sentiment in news or social media, and producing insight from financial jargon and complex data.
LLMs excel at producing text that reads as if a human wrote it, because their core skill is predicting sequences of words. Guaranteeing that financial figures are correct, and figures are not linguistic information, is not one of their core skills, so misreading a financial metric should be expected. Leaning too heavily on LLM output, with no human oversight, can produce errors in strategy, compliance, or analysis. The common safeguard is a hybrid approach: combine LLM output with traditional data-driven models, or subject it to human review as any human-authored work would be.
Generative AI
Generative AI refers to systems that create new content, data, or solutions from patterns they extract from existing data. Where a traditional AI model concentrates on classification or regression tasks, GenAI sets out to produce outputs that look like real-world data, automating analyses that would otherwise take significant human effort. A GenAI model that has learned from historical market data could produce synthetic trading scenarios to test algorithms across a wide range of conditions. This is neither Monte Carlo simulation nor bootstrapping: the model draws out and learns the patterns in existing data before it builds outputs that resemble real observations without simply copying them. GenAI draws on various ML algorithms, among them neural networks such as GANs, VAEs, and transformers.
Handling very large datasets requires a robust infrastructure. Data lakes are centralized repositories that store structured, semi-structured, and unstructured data in the format in which it arrives, allowing flexible processing, and distributed computing frameworks then spread complex computation across many machines. A recurring consideration is the structure of the data itself, since the unstructured nature of alternative data usually calls for special treatment before analysis.
Data processing methods
To choose the right management technique, data scientists work through a sequence of steps. Data capture is how information is collected and converted into a usable format; low-latency systems that move high volumes with minimal delay are essential for automated trading on real-time prices, while high-latency systems suffice when real-time data are not needed. Data curation ensures quality and accuracy through cleaning, reviewing data to find errors and adjusting for missing values. Data storage covers how data are recorded, archived, and accessed and the database design behind it. Search is how the data are queried, which for big data needs advanced applications. Data transfer is how data move from the source or storage to the analytical tool, for example through a direct exchange price feed.
Data visualization
Visualization is how data are formatted, displayed, and summarized in graphical form so they can be understood. Traditional structured data can be shown with tables, charts, and trends, but unstructured data need new techniques. Interactive three-dimensional graphics let a user focus on chosen ranges and rotate the data across three axes. When more than three variables are involved, multidimensional analysis adds color, shapes, and sizes, and further options match the geometry of the display to the structure of the data, including heat maps, tree diagrams, and network graphs. For textual data, a tag cloud, or word cloud, sizes each word by how often it appears, so frequent words are shown larger. A mind map is a related technique that, rather than showing frequency, displays how concepts relate to one another.
Programming languages and databases
Several programming languages are common in data science. Python is a free, open-source language accessible to those with little programming background and underpins many fintech applications. R is a free, open-source language traditionally used for statistical work, with packages for ML, optimization, and econometrics. Java runs across different computers and operating systems and supports many internet applications. C and C++ allow source code to be optimized for calculation speed and are used in algorithmic and high-frequency trading. Excel VBA bridges programming and manual work by letting users run macros to automate tasks and build customized reports.
Databases fall into a few common types. SQL stores structured data in tables of rows and columns and runs on a server accessed by users. SQLite also stores structured data but is embedded in the program rather than run on a server, which makes it common for mobile apps. NoSQL is used for unstructured data that cannot be summarized in traditional tables.
An analyst must pick a visualization or storage tool for each situation below and justify the choice.