In recent years, rapid advancements in technology are reshaping financial markets. McKinsey (2016) and the Boston Consulting Group (2015), forecasted that by 2025, financial risk management, corporate finance and asset management will be dominated by the interaction between big data and machine learning. While all of the major market players (HSBC, J.P. Morgan, UBS) are hiring computer science experts to integrate new technologies in their business activities, academic research in financial economics is still largely ignoring these developments. The aim of this study is to update our understanding of one of the cornerstones of the theory of finance, the pricing kernel, by exploiting these new technologies. This project studies expected returns at different frequencies using new techniques provided by machine learning and data science. The out of sample predictability of financial markets using these new powerful techniques will be investigated extensively, however the core objective of this project is to understand the rationale underpinning predictability and how this can affect the pricing kernel. Indeed, we propose a conceptual framework able to unify the rational and the behavioural approach toward asset pricing, solving some of the most puzzling anomalies in the field: momentum, post earnings announcement drift, and underreaction-overreaction. In the first part of the research we will focus on yearly returns, studying the interactions among fundamentally and behaviourally based predictors. To conduct our analysis in an elegant and rigorous way, we will start from the framework proposed by Campbell and Shiller (1988). We will continue by showing how expected returns and dividend growth cannot be forecasted beyond a few years even if employing the most sophisticated machine learning techniques currently available. This implies that the current price is mostly the result of two perpetuities: one of expected dividend growth and one of expected returns. Then, we will study how the dynamics of these perpetuities are affected by the interaction between behaviourally and risk based components and how this can enhance our understanding of equity returns in terms of return predictability and pricing kernel formulation. In the second part of the research we will study intra-daily returns which are the domain of algorithmic trading. Here, we propose a novel approach: rebuilding the main trading strategies commonly employed in professional trading desks and demonstrating how, while short term returns are unconditionally unpredictable on average, they are conditionally predictable on average when observing a strong trading signal. This will lead us to investigate the rationale underpinning the emergence of trading signals and how their existence can be reconciled with current economic theories. Then, we will study how the interdependencies among inter-market and inter-temporal signals are the basis of the phenomenon called contagion and of numerous patterns (“flows of predictability”) across securities and markets. Finally, we will investigate the links among trading signals and the empirical dynamics of the pricing kernel.