This presentation demonstrates how to leverage Google Cloud Platform (GCP) services and TensorFlow to analyze financial time series data, aiming to predict stock market movements based on global interconnections.
Cory Alston, a Solutions Architect at Google Cloud Platform, introduces a solution for applying machine learning to financial time series data using TensorFlow and Google Cloud. The motivation stems f…
Cory Alston, a Solutions Architect at Google Cloud Platform, introduces a solution for applying machine learning to financial time series data using TensorFlow and Google Cloud. The motivation stems from Google's machine learning expertise, GCP's high-performance and cost-effective compute for deep learning, and the increasing demand in financial services for sophisticated data analysis on vast, rapidly growing time series data. The core hypothesis explored is whether the performance of stock markets that close later in the day (e.g., S&P 500) can be predicted by the performance of markets that closed earlier (e.g., FTSE 100), based on the assumption of global market connectivity.
The solution follows a standard data science workflow: data gathering, exploration, transformation, algorithm selection, feature engineering, and model training/testing. Key GCP services utilized include BigQuery for storing publicly available financial time series data and Cloud Datalab (a Jupyter-based environment) for interactive exploration, analysis, and visualization. The emphasis is on fully managed services, allowing users to focus on analysis rather than infrastructure setup. Initial data exploration reveals varying magnitudes and strong autocorrelations at small lags, indicating recent market trends, and negative autocorrelations at larger lags, suggesting cyclical behavior. A scatter matrix highlights strong inter-market correlations, particularly within continents.
To prepare the data for machine learning, two issues are addressed: non-normal distribution and trend lines. The solution transforms the data by taking logged returns, which makes it stationary (mean approximately zero, no trend) and normally distributed. This transformation eliminates autocorrelations within individual markets, aligning with the efficient market hypothesis, but importantly, maintains the correlations *between* different global markets, validating the initial hypothesis. For model features, the presentation focuses on predicting the up/down movement of the S&P 500 using data from all eight indices over the three preceding days. Due to simultaneous closing times, same-day North American data cannot predict other North American markets, but earlier-closing European and Asian market data can be used.
The modeling phase employs TensorFlow to build two classifiers. First, a simple softmax regression model is implemented to establish a baseline. TensorFlow's fundamental concepts, such as defining a computational graph and executing it within a session, are briefly explained. The model uses placeholders for input/output and variables for weights/biases, with cross-entropy as the cost function. This simple model achieves an accuracy of approximately 60% on test data and an f1-score of 0.35-0.36. Subsequently, a more sophisticated feed-forward neural network with two hidden layers is developed, demonstrating TensorFlow's capability to build complex models with relatively concise code. The more sophisticated model yields
This DeepLearning.AI short course, led by Harrison Chase, teaches how to build agents with long-term memory using LangGraph. Participants will learn to implement semantic, episodic, and procedural memory in agentic workflows.
This DeepLearning.AI short course, "Long-Term Agentic Memory with LangGraph," provides a practical guide to building agents equipped with long-term memory capabilities. Taught by Harrison Chase, Co-Fo…
This DeepLearning.AI short course, "Long-Term Agentic Memory with LangGraph," provides a practical guide to building agents equipped with long-term memory capabilities. Taught by Harrison Chase, Co-Founder and CEO of LangChain, the course focuses on implementing different types of memory—semantic, episodic, and procedural—within agentic workflows using LangGraph.
The core of the course involves building a personal email agent. This agent is designed to intelligently manage email communication by routing, composing, and scheduling responses. It can also prioritize incoming emails, determining whether to ignore them, respond directly, or notify the user for further action.
The curriculum covers essential techniques for equipping agents with long-term memory. This includes adding facts and user preferences to a searchable memory store, enabling the agent to learn and adapt to user-specific information. The course also explores the use of few-shot examples to help the agent learn user preferences from limited data. Furthermore, it covers strategies for optimizing system prompts based on user feedback, allowing for continuous improvement of the agent's performance.
The course is approximately 1 hour and 4 minutes long and features 7 video lessons and 5 code examples. It is tailored for individuals with a foundational understanding of Python and basic LLM prompting concepts.