diff --git a/lectures/_static/lecture_specific/risk_aversion_or_mistaken_beliefs/fig1_tom.png b/lectures/_static/lecture_specific/risk_aversion_or_mistaken_beliefs/fig1_tom.png deleted file mode 100644 index 228482539..000000000 Binary files a/lectures/_static/lecture_specific/risk_aversion_or_mistaken_beliefs/fig1_tom.png and /dev/null differ diff --git a/lectures/_static/lecture_specific/risk_aversion_or_mistaken_beliefs/fred_data.csv b/lectures/_static/lecture_specific/risk_aversion_or_mistaken_beliefs/fred_data.csv new file mode 100644 index 000000000..bf41c8d4d --- /dev/null +++ b/lectures/_static/lecture_specific/risk_aversion_or_mistaken_beliefs/fred_data.csv @@ -0,0 +1,862 @@ +DATE,GS1,GS5,GS10,DFII5,DFII10,USREC +1953-04-01,2.36,2.62,2.83,,,0 +1953-05-01,2.48,2.87,3.05,,,0 +1953-06-01,2.45,2.94,3.11,,,0 +1953-07-01,2.38,2.75,2.93,,,0 +1953-08-01,2.28,2.8,2.95,,,1 +1953-09-01,2.2,2.71,2.87,,,1 +1953-10-01,1.79,2.43,2.66,,,1 +1953-11-01,1.67,2.42,2.68,,,1 +1953-12-01,1.66,2.32,2.59,,,1 +1954-01-01,1.41,2.17,2.48,,,1 +1954-02-01,1.14,2.04,2.47,,,1 +1954-03-01,1.13,1.93,2.37,,,1 +1954-04-01,0.96,1.87,2.29,,,1 +1954-05-01,0.85,1.92,2.37,,,1 +1954-06-01,0.82,1.92,2.38,,,0 +1954-07-01,0.84,1.85,2.3,,,0 +1954-08-01,0.88,1.9,2.36,,,0 +1954-09-01,1.03,1.96,2.38,,,0 +1954-10-01,1.17,2.02,2.43,,,0 +1954-11-01,1.14,2.09,2.48,,,0 +1954-12-01,1.21,2.16,2.51,,,0 +1955-01-01,1.39,2.32,2.61,,,0 +1955-02-01,1.57,2.38,2.65,,,0 +1955-03-01,1.59,2.48,2.68,,,0 +1955-04-01,1.75,2.55,2.75,,,0 +1955-05-01,1.9,2.56,2.76,,,0 +1955-06-01,1.91,2.59,2.78,,,0 +1955-07-01,2.02,2.72,2.9,,,0 +1955-08-01,2.37,2.86,2.97,,,0 +1955-09-01,2.36,2.85,2.97,,,0 +1955-10-01,2.39,2.76,2.88,,,0 +1955-11-01,2.48,2.81,2.89,,,0 +1955-12-01,2.73,2.93,2.96,,,0 +1956-01-01,2.58,2.84,2.9,,,0 +1956-02-01,2.49,2.74,2.84,,,0 +1956-03-01,2.61,2.93,2.96,,,0 +1956-04-01,2.92,3.2,3.18,,,0 +1956-05-01,2.94,3.08,3.07,,,0 +1956-06-01,2.74,2.97,3.0,,,0 +1956-07-01,2.76,3.12,3.11,,,0 +1956-08-01,3.1,3.41,3.33,,,0 +1956-09-01,3.35,3.47,3.38,,,0 +1956-10-01,3.28,3.4,3.34,,,0 +1956-11-01,3.44,3.56,3.49,,,0 +1956-12-01,3.68,3.7,3.59,,,0 +1957-01-01,3.37,3.47,3.46,,,0 +1957-02-01,3.38,3.39,3.34,,,0 +1957-03-01,3.42,3.46,3.41,,,0 +1957-04-01,3.49,3.53,3.48,,,0 +1957-05-01,3.48,3.64,3.6,,,0 +1957-06-01,3.65,3.83,3.8,,,0 +1957-07-01,3.81,4.0,3.93,,,0 +1957-08-01,4.01,4.0,3.93,,,0 +1957-09-01,4.07,4.03,3.92,,,1 +1957-10-01,4.01,4.08,3.97,,,1 +1957-11-01,3.57,3.72,3.72,,,1 +1957-12-01,3.18,3.08,3.21,,,1 +1958-01-01,2.65,2.88,3.09,,,1 +1958-02-01,1.99,2.78,3.05,,,1 +1958-03-01,1.84,2.64,2.98,,,1 +1958-04-01,1.45,2.46,2.88,,,1 +1958-05-01,1.37,2.41,2.92,,,0 +1958-06-01,1.23,2.46,2.97,,,0 +1958-07-01,1.61,2.77,3.2,,,0 +1958-08-01,2.5,3.29,3.54,,,0 +1958-09-01,3.05,3.69,3.76,,,0 +1958-10-01,3.19,3.78,3.8,,,0 +1958-11-01,3.1,3.7,3.74,,,0 +1958-12-01,3.29,3.82,3.86,,,0 +1959-01-01,3.36,4.01,4.02,,,0 +1959-02-01,3.54,3.96,3.96,,,0 +1959-03-01,3.61,3.99,3.99,,,0 +1959-04-01,3.72,4.12,4.12,,,0 +1959-05-01,3.96,4.35,4.31,,,0 +1959-06-01,4.07,4.5,4.34,,,0 +1959-07-01,4.39,4.58,4.4,,,0 +1959-08-01,4.42,4.57,4.43,,,0 +1959-09-01,5.0,4.9,4.68,,,0 +1959-10-01,4.8,4.72,4.53,,,0 +1959-11-01,4.81,4.75,4.53,,,0 +1959-12-01,5.14,5.01,4.69,,,0 +1960-01-01,5.03,4.92,4.72,,,0 +1960-02-01,4.66,4.69,4.49,,,0 +1960-03-01,4.02,4.31,4.25,,,0 +1960-04-01,4.04,4.29,4.28,,,0 +1960-05-01,4.21,4.49,4.35,,,1 +1960-06-01,3.36,4.12,4.15,,,1 +1960-07-01,3.2,3.79,3.9,,,1 +1960-08-01,2.95,3.62,3.8,,,1 +1960-09-01,3.07,3.61,3.8,,,1 +1960-10-01,3.04,3.76,3.89,,,1 +1960-11-01,3.08,3.81,3.93,,,1 +1960-12-01,2.86,3.67,3.84,,,1 +1961-01-01,2.81,3.67,3.84,,,1 +1961-02-01,2.93,3.66,3.78,,,1 +1961-03-01,2.88,3.6,3.74,,,0 +1961-04-01,2.88,3.57,3.78,,,0 +1961-05-01,2.87,3.47,3.71,,,0 +1961-06-01,3.06,3.81,3.88,,,0 +1961-07-01,2.92,3.84,3.92,,,0 +1961-08-01,3.06,3.96,4.04,,,0 +1961-09-01,3.06,3.9,3.98,,,0 +1961-10-01,3.05,3.8,3.92,,,0 +1961-11-01,3.07,3.82,3.94,,,0 +1961-12-01,3.18,3.91,4.06,,,0 +1962-01-01,3.28,3.94,4.08,,,0 +1962-02-01,3.28,3.89,4.04,,,0 +1962-03-01,3.06,3.68,3.93,,,0 +1962-04-01,2.99,3.6,3.84,,,0 +1962-05-01,3.03,3.66,3.87,,,0 +1962-06-01,3.03,3.64,3.91,,,0 +1962-07-01,3.29,3.8,4.01,,,0 +1962-08-01,3.2,3.71,3.98,,,0 +1962-09-01,3.06,3.7,3.98,,,0 +1962-10-01,2.98,3.64,3.93,,,0 +1962-11-01,3.0,3.6,3.92,,,0 +1962-12-01,3.01,3.56,3.86,,,0 +1963-01-01,3.04,3.58,3.83,,,0 +1963-02-01,3.01,3.66,3.92,,,0 +1963-03-01,3.03,3.68,3.93,,,0 +1963-04-01,3.11,3.74,3.97,,,0 +1963-05-01,3.12,3.72,3.93,,,0 +1963-06-01,3.2,3.81,3.99,,,0 +1963-07-01,3.48,3.89,4.02,,,0 +1963-08-01,3.53,3.89,4.0,,,0 +1963-09-01,3.57,3.96,4.08,,,0 +1963-10-01,3.64,3.97,4.11,,,0 +1963-11-01,3.74,4.01,4.12,,,0 +1963-12-01,3.81,4.04,4.13,,,0 +1964-01-01,3.79,4.07,4.17,,,0 +1964-02-01,3.78,4.03,4.15,,,0 +1964-03-01,3.91,4.14,4.22,,,0 +1964-04-01,3.91,4.15,4.23,,,0 +1964-05-01,3.84,4.05,4.2,,,0 +1964-06-01,3.83,4.02,4.17,,,0 +1964-07-01,3.72,4.03,4.19,,,0 +1964-08-01,3.74,4.05,4.19,,,0 +1964-09-01,3.84,4.08,4.2,,,0 +1964-10-01,3.86,4.07,4.19,,,0 +1964-11-01,3.91,4.04,4.15,,,0 +1964-12-01,4.02,4.09,4.18,,,0 +1965-01-01,3.94,4.1,4.19,,,0 +1965-02-01,4.03,4.15,4.21,,,0 +1965-03-01,4.06,4.15,4.21,,,0 +1965-04-01,4.04,4.15,4.2,,,0 +1965-05-01,4.03,4.15,4.21,,,0 +1965-06-01,3.99,4.15,4.21,,,0 +1965-07-01,3.98,4.15,4.2,,,0 +1965-08-01,4.07,4.2,4.25,,,0 +1965-09-01,4.2,4.25,4.29,,,0 +1965-10-01,4.3,4.34,4.35,,,0 +1965-11-01,4.37,4.46,4.45,,,0 +1965-12-01,4.72,4.72,4.62,,,0 +1966-01-01,4.88,4.86,4.61,,,0 +1966-02-01,4.94,4.98,4.83,,,0 +1966-03-01,4.97,4.92,4.87,,,0 +1966-04-01,4.9,4.83,4.75,,,0 +1966-05-01,4.93,4.89,4.78,,,0 +1966-06-01,4.97,4.97,4.81,,,0 +1966-07-01,5.17,5.17,5.02,,,0 +1966-08-01,5.54,5.5,5.22,,,0 +1966-09-01,5.82,5.5,5.18,,,0 +1966-10-01,5.58,5.27,5.01,,,0 +1966-11-01,5.54,5.36,5.16,,,0 +1966-12-01,5.2,5.0,4.84,,,0 +1967-01-01,4.75,4.7,4.58,,,0 +1967-02-01,4.71,4.74,4.63,,,0 +1967-03-01,4.35,4.54,4.54,,,0 +1967-04-01,4.11,4.51,4.59,,,0 +1967-05-01,4.15,4.75,4.85,,,0 +1967-06-01,4.48,5.01,5.02,,,0 +1967-07-01,5.01,5.23,5.16,,,0 +1967-08-01,5.13,5.31,5.28,,,0 +1967-09-01,5.24,5.4,5.3,,,0 +1967-10-01,5.37,5.57,5.48,,,0 +1967-11-01,5.61,5.78,5.75,,,0 +1967-12-01,5.71,5.75,5.7,,,0 +1968-01-01,5.43,5.54,5.53,,,0 +1968-02-01,5.41,5.59,5.56,,,0 +1968-03-01,5.58,5.76,5.74,,,0 +1968-04-01,5.71,5.69,5.64,,,0 +1968-05-01,6.14,6.04,5.87,,,0 +1968-06-01,5.98,5.85,5.72,,,0 +1968-07-01,5.65,5.6,5.5,,,0 +1968-08-01,5.43,5.5,5.42,,,0 +1968-09-01,5.45,5.48,5.46,,,0 +1968-10-01,5.57,5.55,5.58,,,0 +1968-11-01,5.75,5.66,5.7,,,0 +1968-12-01,6.19,6.12,6.03,,,0 +1969-01-01,6.34,6.25,6.04,,,0 +1969-02-01,6.41,6.34,6.19,,,0 +1969-03-01,6.34,6.41,6.3,,,0 +1969-04-01,6.26,6.3,6.17,,,0 +1969-05-01,6.42,6.54,6.32,,,0 +1969-06-01,7.04,6.75,6.57,,,0 +1969-07-01,7.6,7.01,6.72,,,0 +1969-08-01,7.54,7.03,6.69,,,0 +1969-09-01,7.82,7.57,7.16,,,0 +1969-10-01,7.64,7.51,7.1,,,0 +1969-11-01,7.89,7.53,7.14,,,0 +1969-12-01,8.17,7.96,7.65,,,0 +1970-01-01,8.1,8.17,7.79,,,1 +1970-02-01,7.59,7.82,7.24,,,1 +1970-03-01,6.97,7.21,7.07,,,1 +1970-04-01,7.06,7.5,7.39,,,1 +1970-05-01,7.75,7.97,7.91,,,1 +1970-06-01,7.55,7.85,7.84,,,1 +1970-07-01,7.1,7.59,7.46,,,1 +1970-08-01,6.98,7.57,7.53,,,1 +1970-09-01,6.73,7.29,7.39,,,1 +1970-10-01,6.43,7.12,7.33,,,1 +1970-11-01,5.51,6.47,6.84,,,1 +1970-12-01,5.0,5.95,6.39,,,0 +1971-01-01,4.57,5.89,6.24,,,0 +1971-02-01,3.89,5.56,6.11,,,0 +1971-03-01,3.69,5.0,5.7,,,0 +1971-04-01,4.3,5.65,5.83,,,0 +1971-05-01,5.04,6.28,6.39,,,0 +1971-06-01,5.64,6.53,6.52,,,0 +1971-07-01,6.04,6.85,6.73,,,0 +1971-08-01,5.8,6.55,6.58,,,0 +1971-09-01,5.41,6.14,6.14,,,0 +1971-10-01,4.91,5.93,5.93,,,0 +1971-11-01,4.67,5.78,5.81,,,0 +1971-12-01,4.6,5.69,5.93,,,0 +1972-01-01,4.28,5.59,5.95,,,0 +1972-02-01,4.27,5.69,6.08,,,0 +1972-03-01,4.67,5.87,6.07,,,0 +1972-04-01,4.96,6.17,6.19,,,0 +1972-05-01,4.64,5.85,6.13,,,0 +1972-06-01,4.93,5.91,6.11,,,0 +1972-07-01,4.96,5.97,6.11,,,0 +1972-08-01,4.98,6.02,6.21,,,0 +1972-09-01,5.52,6.25,6.55,,,0 +1972-10-01,5.52,6.18,6.48,,,0 +1972-11-01,5.27,6.12,6.28,,,0 +1972-12-01,5.52,6.16,6.36,,,0 +1973-01-01,5.89,6.34,6.46,,,0 +1973-02-01,6.19,6.6,6.64,,,0 +1973-03-01,6.85,6.8,6.71,,,0 +1973-04-01,6.85,6.67,6.67,,,0 +1973-05-01,6.89,6.8,6.85,,,0 +1973-06-01,7.31,6.69,6.9,,,0 +1973-07-01,8.39,7.33,7.13,,,0 +1973-08-01,8.82,7.63,7.4,,,0 +1973-09-01,8.31,7.05,7.09,,,0 +1973-10-01,7.4,6.77,6.79,,,0 +1973-11-01,7.57,6.92,6.73,,,0 +1973-12-01,7.27,6.8,6.74,,,1 +1974-01-01,7.42,6.95,6.99,,,1 +1974-02-01,6.88,6.82,6.96,,,1 +1974-03-01,7.76,7.31,7.21,,,1 +1974-04-01,8.62,7.92,7.51,,,1 +1974-05-01,8.78,8.18,7.58,,,1 +1974-06-01,8.67,8.1,7.54,,,1 +1974-07-01,8.8,8.38,7.81,,,1 +1974-08-01,9.36,8.63,8.04,,,1 +1974-09-01,8.87,8.37,8.04,,,1 +1974-10-01,8.05,7.97,7.9,,,1 +1974-11-01,7.66,7.68,7.68,,,1 +1974-12-01,7.31,7.31,7.43,,,1 +1975-01-01,6.83,7.41,7.5,,,1 +1975-02-01,5.98,7.11,7.39,,,1 +1975-03-01,6.11,7.3,7.73,,,1 +1975-04-01,6.9,7.99,8.23,,,0 +1975-05-01,6.39,7.72,8.06,,,0 +1975-06-01,6.29,7.51,7.86,,,0 +1975-07-01,7.11,7.92,8.06,,,0 +1975-08-01,7.7,8.33,8.4,,,0 +1975-09-01,7.75,8.37,8.43,,,0 +1975-10-01,6.95,7.97,8.14,,,0 +1975-11-01,6.49,7.8,8.05,,,0 +1975-12-01,6.6,7.76,8.0,,,0 +1976-01-01,5.81,7.46,7.74,,,0 +1976-02-01,5.91,7.45,7.79,,,0 +1976-03-01,6.21,7.49,7.73,,,0 +1976-04-01,5.92,7.25,7.56,,,0 +1976-05-01,6.4,7.59,7.9,,,0 +1976-06-01,6.52,7.61,7.86,,,0 +1976-07-01,6.2,7.49,7.83,,,0 +1976-08-01,6.0,7.31,7.77,,,0 +1976-09-01,5.84,7.13,7.59,,,0 +1976-10-01,5.5,6.75,7.41,,,0 +1976-11-01,5.29,6.52,7.29,,,0 +1976-12-01,4.89,6.1,6.87,,,0 +1977-01-01,5.29,6.58,7.21,,,0 +1977-02-01,5.47,6.83,7.39,,,0 +1977-03-01,5.5,6.93,7.46,,,0 +1977-04-01,5.44,6.79,7.37,,,0 +1977-05-01,5.84,6.94,7.46,,,0 +1977-06-01,5.8,6.76,7.28,,,0 +1977-07-01,5.94,6.84,7.33,,,0 +1977-08-01,6.37,7.03,7.4,,,0 +1977-09-01,6.53,7.04,7.34,,,0 +1977-10-01,6.97,7.32,7.52,,,0 +1977-11-01,6.95,7.34,7.58,,,0 +1977-12-01,6.96,7.48,7.69,,,0 +1978-01-01,7.28,7.77,7.96,,,0 +1978-02-01,7.34,7.83,8.03,,,0 +1978-03-01,7.31,7.86,8.04,,,0 +1978-04-01,7.45,7.98,8.15,,,0 +1978-05-01,7.82,8.18,8.35,,,0 +1978-06-01,8.09,8.36,8.46,,,0 +1978-07-01,8.39,8.54,8.64,,,0 +1978-08-01,8.31,8.33,8.41,,,0 +1978-09-01,8.64,8.43,8.42,,,0 +1978-10-01,9.14,8.61,8.64,,,0 +1978-11-01,10.01,8.84,8.81,,,0 +1978-12-01,10.3,9.08,9.01,,,0 +1979-01-01,10.41,9.2,9.1,,,0 +1979-02-01,10.24,9.13,9.1,,,0 +1979-03-01,10.25,9.2,9.12,,,0 +1979-04-01,10.12,9.25,9.18,,,0 +1979-05-01,10.12,9.24,9.25,,,0 +1979-06-01,9.57,8.85,8.91,,,0 +1979-07-01,9.64,8.9,8.95,,,0 +1979-08-01,9.98,9.06,9.03,,,0 +1979-09-01,10.84,9.41,9.33,,,0 +1979-10-01,12.44,10.63,10.3,,,0 +1979-11-01,12.39,10.93,10.65,,,0 +1979-12-01,11.98,10.42,10.39,,,0 +1980-01-01,12.06,10.74,10.8,,,0 +1980-02-01,13.92,12.6,12.41,,,1 +1980-03-01,15.82,13.47,12.75,,,1 +1980-04-01,13.3,11.84,11.47,,,1 +1980-05-01,9.39,9.95,10.18,,,1 +1980-06-01,8.16,9.21,9.78,,,1 +1980-07-01,8.65,9.53,10.25,,,1 +1980-08-01,10.24,10.84,11.1,,,0 +1980-09-01,11.52,11.62,11.51,,,0 +1980-10-01,12.49,11.86,11.75,,,0 +1980-11-01,14.15,12.83,12.68,,,0 +1980-12-01,14.88,13.25,12.84,,,0 +1981-01-01,14.08,12.77,12.57,,,0 +1981-02-01,14.57,13.41,13.19,,,0 +1981-03-01,13.71,13.41,13.12,,,0 +1981-04-01,14.32,13.99,13.68,,,0 +1981-05-01,16.2,14.63,14.1,,,0 +1981-06-01,14.86,13.95,13.47,,,0 +1981-07-01,15.72,14.79,14.28,,,0 +1981-08-01,16.72,15.56,14.94,,,1 +1981-09-01,16.52,15.93,15.32,,,1 +1981-10-01,15.38,15.41,15.15,,,1 +1981-11-01,12.41,13.38,13.39,,,1 +1981-12-01,12.85,13.6,13.72,,,1 +1982-01-01,14.32,14.65,14.59,,,1 +1982-02-01,14.73,14.54,14.43,,,1 +1982-03-01,13.95,13.98,13.86,,,1 +1982-04-01,13.98,14.0,13.87,,,1 +1982-05-01,13.34,13.75,13.62,,,1 +1982-06-01,14.07,14.43,14.3,,,1 +1982-07-01,13.24,14.07,13.95,,,1 +1982-08-01,11.43,13.0,13.06,,,1 +1982-09-01,10.85,12.25,12.34,,,1 +1982-10-01,9.32,10.8,10.91,,,1 +1982-11-01,9.16,10.38,10.55,,,1 +1982-12-01,8.91,10.22,10.54,,,0 +1983-01-01,8.62,10.03,10.46,,,0 +1983-02-01,8.92,10.26,10.72,,,0 +1983-03-01,9.04,10.08,10.51,,,0 +1983-04-01,8.98,10.02,10.4,,,0 +1983-05-01,8.9,10.03,10.38,,,0 +1983-06-01,9.66,10.63,10.85,,,0 +1983-07-01,10.2,11.21,11.38,,,0 +1983-08-01,10.53,11.63,11.85,,,0 +1983-09-01,10.16,11.43,11.65,,,0 +1983-10-01,9.81,11.28,11.54,,,0 +1983-11-01,9.94,11.41,11.69,,,0 +1983-12-01,10.11,11.54,11.83,,,0 +1984-01-01,9.9,11.37,11.67,,,0 +1984-02-01,10.04,11.54,11.84,,,0 +1984-03-01,10.59,12.02,12.32,,,0 +1984-04-01,10.9,12.37,12.63,,,0 +1984-05-01,11.66,13.17,13.41,,,0 +1984-06-01,12.08,13.48,13.56,,,0 +1984-07-01,12.03,13.27,13.36,,,0 +1984-08-01,11.82,12.68,12.72,,,0 +1984-09-01,11.58,12.53,12.52,,,0 +1984-10-01,10.9,12.06,12.16,,,0 +1984-11-01,9.82,11.33,11.57,,,0 +1984-12-01,9.33,11.07,11.5,,,0 +1985-01-01,9.02,10.93,11.38,,,0 +1985-02-01,9.29,11.13,11.51,,,0 +1985-03-01,9.86,11.52,11.86,,,0 +1985-04-01,9.14,11.01,11.43,,,0 +1985-05-01,8.46,10.34,10.85,,,0 +1985-06-01,7.8,9.6,10.16,,,0 +1985-07-01,7.86,9.7,10.31,,,0 +1985-08-01,8.05,9.81,10.33,,,0 +1985-09-01,8.07,9.81,10.37,,,0 +1985-10-01,8.01,9.69,10.24,,,0 +1985-11-01,7.88,9.28,9.78,,,0 +1985-12-01,7.67,8.73,9.26,,,0 +1986-01-01,7.73,8.68,9.19,,,0 +1986-02-01,7.61,8.34,8.7,,,0 +1986-03-01,7.03,7.46,7.78,,,0 +1986-04-01,6.44,7.05,7.3,,,0 +1986-05-01,6.65,7.52,7.71,,,0 +1986-06-01,6.73,7.64,7.8,,,0 +1986-07-01,6.27,7.06,7.3,,,0 +1986-08-01,5.93,6.8,7.17,,,0 +1986-09-01,5.77,6.92,7.45,,,0 +1986-10-01,5.72,6.83,7.43,,,0 +1986-11-01,5.8,6.76,7.25,,,0 +1986-12-01,5.87,6.67,7.11,,,0 +1987-01-01,5.78,6.64,7.08,,,0 +1987-02-01,5.96,6.79,7.25,,,0 +1987-03-01,6.03,6.79,7.25,,,0 +1987-04-01,6.5,7.57,8.02,,,0 +1987-05-01,7.0,8.26,8.61,,,0 +1987-06-01,6.8,8.02,8.4,,,0 +1987-07-01,6.68,8.01,8.45,,,0 +1987-08-01,7.03,8.32,8.76,,,0 +1987-09-01,7.67,8.94,9.42,,,0 +1987-10-01,7.59,9.08,9.52,,,0 +1987-11-01,6.96,8.35,8.86,,,0 +1987-12-01,7.17,8.45,8.99,,,0 +1988-01-01,6.99,8.18,8.67,,,0 +1988-02-01,6.64,7.71,8.21,,,0 +1988-03-01,6.71,7.83,8.37,,,0 +1988-04-01,7.01,8.19,8.72,,,0 +1988-05-01,7.4,8.58,9.09,,,0 +1988-06-01,7.49,8.49,8.92,,,0 +1988-07-01,7.75,8.66,9.06,,,0 +1988-08-01,8.17,8.94,9.26,,,0 +1988-09-01,8.09,8.69,8.98,,,0 +1988-10-01,8.11,8.51,8.8,,,0 +1988-11-01,8.48,8.79,8.96,,,0 +1988-12-01,8.99,9.09,9.11,,,0 +1989-01-01,9.05,9.15,9.09,,,0 +1989-02-01,9.25,9.27,9.17,,,0 +1989-03-01,9.57,9.51,9.36,,,0 +1989-04-01,9.36,9.3,9.18,,,0 +1989-05-01,8.98,8.91,8.86,,,0 +1989-06-01,8.44,8.29,8.28,,,0 +1989-07-01,7.89,7.83,8.02,,,0 +1989-08-01,8.18,8.09,8.11,,,0 +1989-09-01,8.22,8.17,8.19,,,0 +1989-10-01,7.99,7.97,8.01,,,0 +1989-11-01,7.77,7.81,7.87,,,0 +1989-12-01,7.72,7.75,7.84,,,0 +1990-01-01,7.92,8.12,8.21,,,0 +1990-02-01,8.11,8.42,8.47,,,0 +1990-03-01,8.35,8.6,8.59,,,0 +1990-04-01,8.4,8.77,8.79,,,0 +1990-05-01,8.32,8.74,8.76,,,0 +1990-06-01,8.1,8.43,8.48,,,0 +1990-07-01,7.94,8.33,8.47,,,0 +1990-08-01,7.78,8.44,8.75,,,1 +1990-09-01,7.76,8.51,8.89,,,1 +1990-10-01,7.55,8.33,8.72,,,1 +1990-11-01,7.31,8.02,8.39,,,1 +1990-12-01,7.05,7.73,8.08,,,1 +1991-01-01,6.64,7.7,8.09,,,1 +1991-02-01,6.27,7.47,7.85,,,1 +1991-03-01,6.4,7.77,8.11,,,1 +1991-04-01,6.24,7.7,8.04,,,0 +1991-05-01,6.13,7.7,8.07,,,0 +1991-06-01,6.36,7.94,8.28,,,0 +1991-07-01,6.31,7.91,8.27,,,0 +1991-08-01,5.78,7.43,7.9,,,0 +1991-09-01,5.57,7.14,7.65,,,0 +1991-10-01,5.33,6.87,7.53,,,0 +1991-11-01,4.89,6.62,7.42,,,0 +1991-12-01,4.38,6.19,7.09,,,0 +1992-01-01,4.15,6.24,7.03,,,0 +1992-02-01,4.29,6.58,7.34,,,0 +1992-03-01,4.63,6.95,7.54,,,0 +1992-04-01,4.3,6.78,7.48,,,0 +1992-05-01,4.19,6.69,7.39,,,0 +1992-06-01,4.17,6.48,7.26,,,0 +1992-07-01,3.6,5.84,6.84,,,0 +1992-08-01,3.47,5.6,6.59,,,0 +1992-09-01,3.18,5.38,6.42,,,0 +1992-10-01,3.3,5.6,6.59,,,0 +1992-11-01,3.68,6.04,6.87,,,0 +1992-12-01,3.71,6.08,6.77,,,0 +1993-01-01,3.5,5.83,6.6,,,0 +1993-02-01,3.39,5.43,6.26,,,0 +1993-03-01,3.33,5.19,5.98,,,0 +1993-04-01,3.24,5.13,5.97,,,0 +1993-05-01,3.36,5.2,6.04,,,0 +1993-06-01,3.54,5.22,5.96,,,0 +1993-07-01,3.47,5.09,5.81,,,0 +1993-08-01,3.44,5.03,5.68,,,0 +1993-09-01,3.36,4.73,5.36,,,0 +1993-10-01,3.39,4.71,5.33,,,0 +1993-11-01,3.58,5.06,5.72,,,0 +1993-12-01,3.61,5.15,5.77,,,0 +1994-01-01,3.54,5.09,5.75,,,0 +1994-02-01,3.87,5.4,5.97,,,0 +1994-03-01,4.32,5.94,6.48,,,0 +1994-04-01,4.82,6.52,6.97,,,0 +1994-05-01,5.31,6.78,7.18,,,0 +1994-06-01,5.27,6.7,7.1,,,0 +1994-07-01,5.48,6.91,7.3,,,0 +1994-08-01,5.56,6.88,7.24,,,0 +1994-09-01,5.76,7.08,7.46,,,0 +1994-10-01,6.11,7.4,7.74,,,0 +1994-11-01,6.54,7.72,7.96,,,0 +1994-12-01,7.14,7.78,7.81,,,0 +1995-01-01,7.05,7.76,7.78,,,0 +1995-02-01,6.7,7.37,7.47,,,0 +1995-03-01,6.43,7.05,7.2,,,0 +1995-04-01,6.27,6.86,7.06,,,0 +1995-05-01,6.0,6.41,6.63,,,0 +1995-06-01,5.64,5.93,6.17,,,0 +1995-07-01,5.59,6.01,6.28,,,0 +1995-08-01,5.75,6.24,6.49,,,0 +1995-09-01,5.62,6.0,6.2,,,0 +1995-10-01,5.59,5.86,6.04,,,0 +1995-11-01,5.43,5.69,5.93,,,0 +1995-12-01,5.31,5.51,5.71,,,0 +1996-01-01,5.09,5.36,5.65,,,0 +1996-02-01,4.94,5.38,5.81,,,0 +1996-03-01,5.34,5.97,6.27,,,0 +1996-04-01,5.54,6.3,6.51,,,0 +1996-05-01,5.64,6.48,6.74,,,0 +1996-06-01,5.81,6.69,6.91,,,0 +1996-07-01,5.85,6.64,6.87,,,0 +1996-08-01,5.67,6.39,6.64,,,0 +1996-09-01,5.83,6.6,6.83,,,0 +1996-10-01,5.55,6.27,6.53,,,0 +1996-11-01,5.42,5.97,6.2,,,0 +1996-12-01,5.47,6.07,6.3,,,0 +1997-01-01,5.61,6.33,6.58,,,0 +1997-02-01,5.53,6.2,6.42,,,0 +1997-03-01,5.8,6.54,6.69,,,0 +1997-04-01,5.99,6.76,6.89,,,0 +1997-05-01,5.87,6.57,6.71,,,0 +1997-06-01,5.69,6.38,6.49,,,0 +1997-07-01,5.54,6.12,6.22,,,0 +1997-08-01,5.56,6.16,6.3,,,0 +1997-09-01,5.52,6.11,6.21,,,0 +1997-10-01,5.46,5.93,6.03,,,0 +1997-11-01,5.46,5.8,5.88,,,0 +1997-12-01,5.53,5.77,5.81,,,0 +1998-01-01,5.24,5.42,5.54,,,0 +1998-02-01,5.31,5.49,5.57,,,0 +1998-03-01,5.39,5.61,5.65,,,0 +1998-04-01,5.38,5.61,5.64,,,0 +1998-05-01,5.44,5.63,5.65,,,0 +1998-06-01,5.41,5.52,5.5,,,0 +1998-07-01,5.36,5.46,5.46,,,0 +1998-08-01,5.21,5.27,5.34,,,0 +1998-09-01,4.71,4.62,4.81,,,0 +1998-10-01,4.12,4.18,4.53,,,0 +1998-11-01,4.53,4.54,4.83,,,0 +1998-12-01,4.52,4.45,4.65,,,0 +1999-01-01,4.51,4.6,4.72,,,0 +1999-02-01,4.7,4.91,5.0,,,0 +1999-03-01,4.78,5.14,5.23,,,0 +1999-04-01,4.69,5.08,5.18,,,0 +1999-05-01,4.85,5.44,5.54,,,0 +1999-06-01,5.1,5.81,5.9,,,0 +1999-07-01,5.03,5.68,5.79,,,0 +1999-08-01,5.2,5.84,5.94,,,0 +1999-09-01,5.25,5.8,5.92,,,0 +1999-10-01,5.43,6.03,6.11,,,0 +1999-11-01,5.55,5.97,6.03,,,0 +1999-12-01,5.84,6.19,6.28,,,0 +2000-01-01,6.12,6.58,6.66,,,0 +2000-02-01,6.22,6.68,6.52,,,0 +2000-03-01,6.22,6.5,6.26,,,0 +2000-04-01,6.15,6.26,5.99,,,0 +2000-05-01,6.33,6.69,6.44,,,0 +2000-06-01,6.17,6.3,6.1,,,0 +2000-07-01,6.08,6.18,6.05,,,0 +2000-08-01,6.18,6.06,5.83,,,0 +2000-09-01,6.13,5.93,5.8,,,0 +2000-10-01,6.01,5.78,5.74,,,0 +2000-11-01,6.09,5.7,5.72,,,0 +2000-12-01,5.6,5.17,5.24,,,0 +2001-01-01,4.81,4.86,5.16,,,0 +2001-02-01,4.68,4.89,5.1,,,0 +2001-03-01,4.3,4.64,4.89,,,0 +2001-04-01,3.98,4.76,5.14,,,1 +2001-05-01,3.78,4.93,5.39,,,1 +2001-06-01,3.58,4.81,5.28,,,1 +2001-07-01,3.62,4.76,5.24,,,1 +2001-08-01,3.47,4.57,4.97,,,1 +2001-09-01,2.82,4.12,4.73,,,1 +2001-10-01,2.33,3.91,4.57,,,1 +2001-11-01,2.18,3.97,4.65,,,1 +2001-12-01,2.22,4.39,5.09,,,0 +2002-01-01,2.16,4.34,5.04,,,0 +2002-02-01,2.23,4.3,4.91,,,0 +2002-03-01,2.57,4.74,5.28,,,0 +2002-04-01,2.48,4.65,5.21,,,0 +2002-05-01,2.35,4.49,5.16,,,0 +2002-06-01,2.2,4.19,4.93,,,0 +2002-07-01,1.96,3.81,4.65,,,0 +2002-08-01,1.76,3.29,4.26,,,0 +2002-09-01,1.72,2.94,3.87,,,0 +2002-10-01,1.65,2.95,3.94,,,0 +2002-11-01,1.49,3.05,4.05,,,0 +2002-12-01,1.45,3.03,4.03,,,0 +2003-01-01,1.36,3.05,4.05,1.65,2.29,0 +2003-02-01,1.3,2.9,3.9,1.24,1.99,0 +2003-03-01,1.24,2.78,3.81,1.09,1.94,0 +2003-04-01,1.27,2.93,3.96,1.36,2.18,0 +2003-05-01,1.18,2.52,3.57,1.18,1.91,0 +2003-06-01,1.01,2.27,3.33,0.91,1.72,0 +2003-07-01,1.12,2.87,3.98,1.3,2.11,0 +2003-08-01,1.31,3.37,4.45,1.48,2.32,0 +2003-09-01,1.24,3.18,4.27,1.29,2.19,0 +2003-10-01,1.25,3.19,4.29,1.21,2.08,0 +2003-11-01,1.34,3.29,4.3,1.27,1.96,0 +2003-12-01,1.31,3.27,4.27,1.23,1.98,0 +2004-01-01,1.24,3.12,4.15,1.09,1.89,0 +2004-02-01,1.24,3.07,4.08,0.86,1.76,0 +2004-03-01,1.19,2.79,3.83,0.52,1.47,0 +2004-04-01,1.43,3.39,4.35,1.02,1.9,0 +2004-05-01,1.78,3.85,4.72,1.34,2.09,0 +2004-06-01,2.12,3.93,4.73,1.41,2.15,0 +2004-07-01,2.1,3.69,4.5,1.29,2.02,0 +2004-08-01,2.02,3.47,4.28,1.12,1.86,0 +2004-09-01,2.12,3.36,4.13,1.1,1.8,0 +2004-10-01,2.23,3.35,4.1,0.97,1.73,0 +2004-11-01,2.5,3.53,4.19,0.9,1.68,0 +2004-12-01,2.67,3.6,4.23,0.92,1.67,0 +2005-01-01,2.86,3.71,4.22,1.13,1.72,0 +2005-02-01,3.03,3.77,4.17,1.08,1.63,0 +2005-03-01,3.3,4.17,4.5,1.29,1.79,0 +2005-04-01,3.32,4.0,4.34,1.23,1.71,0 +2005-05-01,3.33,3.85,4.14,1.28,1.65,0 +2005-06-01,3.36,3.77,4.0,1.39,1.67,0 +2005-07-01,3.64,3.98,4.18,1.67,1.88,0 +2005-08-01,3.87,4.12,4.26,1.71,1.89,0 +2005-09-01,3.85,4.01,4.2,1.4,1.7,0 +2005-10-01,4.18,4.33,4.46,1.7,1.94,0 +2005-11-01,4.33,4.45,4.54,1.97,2.06,0 +2005-12-01,4.35,4.39,4.47,2.09,2.12,0 +2006-01-01,4.45,4.35,4.42,1.93,2.01,0 +2006-02-01,4.68,4.57,4.57,1.98,2.05,0 +2006-03-01,4.77,4.72,4.72,2.09,2.2,0 +2006-04-01,4.9,4.9,4.99,2.26,2.41,0 +2006-05-01,5.0,5.0,5.11,2.3,2.45,0 +2006-06-01,5.16,5.07,5.11,2.45,2.53,0 +2006-07-01,5.22,5.04,5.09,2.46,2.51,0 +2006-08-01,5.08,4.82,4.88,2.27,2.29,0 +2006-09-01,4.97,4.67,4.72,2.38,2.32,0 +2006-10-01,5.01,4.69,4.73,2.51,2.41,0 +2006-11-01,5.01,4.58,4.6,2.41,2.29,0 +2006-12-01,4.94,4.53,4.56,2.28,2.25,0 +2007-01-01,5.06,4.75,4.76,2.47,2.44,0 +2007-02-01,5.05,4.71,4.72,2.34,2.36,0 +2007-03-01,4.92,4.48,4.56,2.04,2.18,0 +2007-04-01,4.93,4.59,4.69,2.12,2.26,0 +2007-05-01,4.91,4.67,4.75,2.29,2.37,0 +2007-06-01,4.96,5.03,5.1,2.65,2.69,0 +2007-07-01,4.96,4.88,5.0,2.6,2.64,0 +2007-08-01,4.47,4.43,4.67,2.39,2.44,0 +2007-09-01,4.14,4.2,4.52,2.14,2.26,0 +2007-10-01,4.1,4.2,4.53,2.01,2.2,0 +2007-11-01,3.5,3.67,4.15,1.35,1.77,0 +2007-12-01,3.26,3.49,4.1,1.27,1.79,0 +2008-01-01,2.71,2.98,3.74,0.86,1.47,1 +2008-02-01,2.05,2.78,3.74,0.65,1.41,1 +2008-03-01,1.54,2.48,3.51,0.23,1.09,1 +2008-04-01,1.74,2.84,3.68,0.62,1.36,1 +2008-05-01,2.06,3.15,3.88,0.79,1.46,1 +2008-06-01,2.42,3.49,4.1,0.97,1.63,1 +2008-07-01,2.28,3.3,4.01,0.84,1.57,1 +2008-08-01,2.18,3.14,3.89,1.15,1.68,1 +2008-09-01,1.91,2.88,3.69,1.55,1.85,1 +2008-10-01,1.42,2.73,3.81,2.75,2.75,1 +2008-11-01,1.07,2.29,3.53,3.69,2.89,1 +2008-12-01,0.49,1.52,2.42,1.76,2.17,1 +2009-01-01,0.44,1.6,2.52,1.59,1.91,1 +2009-02-01,0.62,1.87,2.87,1.29,1.75,1 +2009-03-01,0.64,1.82,2.82,1.23,1.71,1 +2009-04-01,0.55,1.86,2.93,1.11,1.57,1 +2009-05-01,0.5,2.13,3.29,1.07,1.72,1 +2009-06-01,0.51,2.71,3.72,1.18,1.86,1 +2009-07-01,0.48,2.46,3.56,1.18,1.82,0 +2009-08-01,0.46,2.57,3.59,1.29,1.77,0 +2009-09-01,0.4,2.37,3.4,1.03,1.64,0 +2009-10-01,0.37,2.33,3.39,0.83,1.48,0 +2009-11-01,0.31,2.23,3.4,0.48,1.28,0 +2009-12-01,0.37,2.34,3.59,0.43,1.36,0 +2010-01-01,0.35,2.48,3.73,0.42,1.37,0 +2010-02-01,0.35,2.36,3.69,0.42,1.42,0 +2010-03-01,0.4,2.43,3.73,0.56,1.51,0 +2010-04-01,0.45,2.58,3.85,0.62,1.5,0 +2010-05-01,0.37,2.18,3.42,0.41,1.31,0 +2010-06-01,0.32,2.0,3.2,0.34,1.26,0 +2010-07-01,0.29,1.76,3.01,0.34,1.24,0 +2010-08-01,0.26,1.47,2.7,0.13,1.02,0 +2010-09-01,0.26,1.41,2.65,0.13,0.91,0 +2010-10-01,0.23,1.18,2.54,-0.32,0.53,0 +2010-11-01,0.25,1.35,2.76,-0.21,0.67,0 +2010-12-01,0.29,1.93,3.29,0.21,1.04,0 +2011-01-01,0.27,1.99,3.39,0.06,1.06,0 +2011-02-01,0.29,2.26,3.58,0.25,1.24,0 +2011-03-01,0.26,2.11,3.41,-0.09,0.96,0 +2011-04-01,0.25,2.17,3.46,-0.14,0.86,0 +2011-05-01,0.19,1.84,3.17,-0.34,0.78,0 +2011-06-01,0.18,1.58,3.0,-0.38,0.76,0 +2011-07-01,0.19,1.54,3.0,-0.49,0.62,0 +2011-08-01,0.11,1.02,2.3,-0.75,0.14,0 +2011-09-01,0.1,0.9,1.98,-0.72,0.08,0 +2011-10-01,0.11,1.06,2.15,-0.63,0.19,0 +2011-11-01,0.11,0.91,2.01,-0.85,0.0,0 +2011-12-01,0.12,0.89,1.98,-0.78,-0.03,0 +2012-01-01,0.12,0.84,1.97,-0.92,-0.11,0 +2012-02-01,0.16,0.83,1.97,-1.11,-0.25,0 +2012-03-01,0.19,1.02,2.17,-1.03,-0.14,0 +2012-04-01,0.18,0.89,2.05,-1.06,-0.21,0 +2012-05-01,0.19,0.76,1.8,-1.12,-0.34,0 +2012-06-01,0.19,0.71,1.62,-1.05,-0.5,0 +2012-07-01,0.19,0.62,1.53,-1.15,-0.6,0 +2012-08-01,0.18,0.71,1.68,-1.19,-0.59,0 +2012-09-01,0.18,0.67,1.72,-1.47,-0.71,0 +2012-10-01,0.18,0.71,1.75,-1.47,-0.75,0 +2012-11-01,0.18,0.67,1.65,-1.38,-0.77,0 +2012-12-01,0.16,0.7,1.72,-1.4,-0.76,0 +2013-01-01,0.15,0.81,1.91,-1.39,-0.61,0 +2013-02-01,0.16,0.85,1.98,-1.39,-0.57,0 +2013-03-01,0.15,0.82,1.96,-1.43,-0.59,0 +2013-04-01,0.12,0.71,1.76,-1.38,-0.65,0 +2013-05-01,0.12,0.84,1.93,-1.14,-0.36,0 +2013-06-01,0.14,1.2,2.3,-0.59,0.25,0 +2013-07-01,0.12,1.4,2.58,-0.45,0.46,0 +2013-08-01,0.13,1.52,2.74,-0.33,0.55,0 +2013-09-01,0.12,1.6,2.81,-0.17,0.66,0 +2013-10-01,0.12,1.37,2.62,-0.41,0.43,0 +2013-11-01,0.12,1.37,2.72,-0.38,0.55,0 +2013-12-01,0.13,1.58,2.9,-0.09,0.74,0 +2014-01-01,0.12,1.65,2.86,-0.09,0.63,0 +2014-02-01,0.12,1.52,2.71,-0.26,0.55,0 +2014-03-01,0.13,1.64,2.72,-0.14,0.56,0 +2014-04-01,0.11,1.7,2.71,-0.11,0.54,0 +2014-05-01,0.1,1.59,2.56,-0.34,0.37,0 +2014-06-01,0.1,1.68,2.6,-0.29,0.37,0 +2014-07-01,0.11,1.7,2.54,-0.27,0.28,0 +2014-08-01,0.11,1.63,2.42,-0.21,0.22,0 +2014-09-01,0.11,1.77,2.53,0.1,0.46,0 +2014-10-01,0.1,1.55,2.3,0.06,0.38,0 +2014-11-01,0.13,1.62,2.33,0.14,0.45,0 +2014-12-01,0.21,1.64,2.21,0.37,0.51,0 +2015-01-01,0.2,1.37,1.88,0.17,0.27,0 +2015-02-01,0.22,1.47,1.98,0.11,0.26,0 +2015-03-01,0.25,1.52,2.04,0.04,0.28,0 +2015-04-01,0.23,1.35,1.94,-0.26,0.08,0 +2015-05-01,0.24,1.54,2.2,-0.1,0.33,0 +2015-06-01,0.28,1.68,2.36,0.05,0.5,0 +2015-07-01,0.3,1.63,2.32,0.14,0.5,0 +2015-08-01,0.38,1.54,2.17,0.31,0.56,0 +2015-09-01,0.37,1.49,2.17,0.33,0.65,0 +2015-10-01,0.26,1.39,2.07,0.21,0.57,0 +2015-11-01,0.48,1.67,2.26,0.4,0.69,0 +2015-12-01,0.65,1.7,2.24,0.46,0.73,0 +2016-01-01,0.54,1.52,2.09,0.33,0.67,0 +2016-02-01,0.53,1.22,1.78,0.14,0.47,0 +2016-03-01,0.66,1.38,1.89,-0.03,0.34,0 +2016-04-01,0.56,1.26,1.81,-0.22,0.19,0 +2016-05-01,0.59,1.3,1.81,-0.22,0.21,0 +2016-06-01,0.55,1.17,1.64,-0.27,0.17,0 +2016-07-01,0.51,1.07,1.5,-0.32,0.04,0 +2016-08-01,0.57,1.13,1.56,-0.17,0.09,0 +2016-09-01,0.59,1.18,1.63,-0.17,0.12,0 +2016-10-01,0.66,1.27,1.76,-0.26,0.1,0 +2016-11-01,0.74,1.6,2.14,-0.07,0.32,0 +2016-12-01,0.87,1.96,2.49,0.15,0.56,0 +2017-01-01,0.83,1.92,2.43,0.03,0.42,0 +2017-02-01,0.82,1.9,2.42,0.01,0.4,0 +2017-03-01,1.01,2.01,2.48,0.18,0.49,0 +2017-04-01,1.04,1.82,2.3,0.08,0.39,0 +2017-05-01,1.12,1.84,2.3,0.09,0.47,0 +2017-06-01,1.2,1.77,2.19,0.14,0.46,0 +2017-07-01,1.22,1.87,2.32,0.23,0.55,0 +2017-08-01,1.23,1.78,2.21,0.16,0.43,0 +2017-09-01,1.28,1.8,2.2,0.12,0.37,0 +2017-10-01,1.4,1.98,2.36,0.25,0.5,0 +2017-11-01,1.56,2.05,2.35,0.3,0.5,0 +2017-12-01,1.7,2.18,2.4,0.42,0.5,0 +2018-01-01,1.8,2.38,2.58,0.45,0.54,0 +2018-02-01,1.96,2.6,2.86,0.63,0.76,0 +2018-03-01,2.06,2.63,2.84,0.61,0.75,0 +2018-04-01,2.15,2.7,2.87,0.65,0.74,0 +2018-05-01,2.27,2.82,2.98,0.72,0.84,0 +2018-06-01,2.33,2.78,2.91,0.71,0.79,0 +2018-07-01,2.39,2.78,2.89,0.74,0.77,0 +2018-08-01,2.45,2.77,2.89,0.79,0.79,0 +2018-09-01,2.56,2.89,3.0,0.89,0.88,0 +2018-10-01,2.65,3.0,3.15,1.01,1.04,0 +2018-11-01,2.7,2.95,3.12,1.1,1.11,0 +2018-12-01,2.66,2.68,2.83,1.08,1.02,0 +2019-01-01,2.58,2.54,2.71,0.91,0.92,0 +2019-02-01,2.55,2.49,2.68,0.73,0.8,0 +2019-03-01,2.49,2.37,2.57,0.56,0.66,0 +2019-04-01,2.42,2.33,2.53,0.49,0.6,0 +2019-05-01,2.34,2.19,2.4,0.48,0.57,0 +2019-06-01,2.0,1.83,2.07,0.28,0.37,0 +2019-07-01,1.96,1.83,2.06,0.25,0.31,0 +2019-08-01,1.77,1.49,1.63,0.11,0.04,0 +2019-09-01,1.8,1.57,1.7,0.17,0.11,0 +2019-10-01,1.61,1.53,1.71,0.12,0.15,0 +2019-11-01,1.57,1.64,1.81,0.09,0.17,0 +2019-12-01,1.55,1.68,1.86,0.06,0.14,0 +2020-01-01,1.53,1.56,1.76,-0.09,0.04,0 +2020-02-01,1.41,1.32,1.5,-0.26,-0.11,0 +2020-03-01,0.33,0.59,0.87,-0.08,-0.12,1 +2020-04-01,0.18,0.39,0.66,-0.37,-0.45,1 +2020-05-01,0.16,0.34,0.67,-0.43,-0.44,0 +2020-06-01,0.18,0.34,0.73,-0.67,-0.54,0 +2020-07-01,0.15,0.28,0.62,-1.03,-0.83,0 +2020-08-01,0.13,0.27,0.65,-1.28,-1.01,0 +2020-09-01,0.13,0.27,0.68,-1.26,-0.98,0 +2020-10-01,0.13,0.34,0.79,-1.23,-0.92,0 +2020-11-01,0.12,0.39,0.87,-1.24,-0.84,0 +2020-12-01,0.1,0.39,0.93,-1.48,-0.98,0 +2021-01-01,0.1,0.45,1.08,-1.66,-1.0,0 +2021-02-01,0.07,0.54,1.26,-1.77,-0.92,0 +2021-03-01,0.08,0.82,1.61,-1.67,-0.66,0 +2021-04-01,0.06,0.86,1.64,-1.67,-0.71,0 +2021-05-01,0.05,0.82,1.62,-1.83,-0.85,0 +2021-06-01,0.07,0.84,1.52,-1.63,-0.82,0 +2021-07-01,0.08,0.76,1.32,-1.73,-1.01,0 +2021-08-01,0.07,0.77,1.28,-1.72,-1.07,0 +2021-09-01,0.08,0.86,1.37,-1.63,-0.97,0 +2021-10-01,0.11,1.11,1.58,-1.64,-0.95,0 +2021-11-01,0.18,1.2,1.56,-1.78,-1.06,0 +2021-12-01,0.3,1.23,1.47,-1.52,-0.99,0 +2022-01-01,0.55,1.54,1.76,-1.26,-0.69,0 +2022-02-01,1.0,1.81,1.93,-1.06,-0.52,0 +2022-03-01,1.34,2.11,2.13,-1.3,-0.72,0 +2022-04-01,1.89,2.78,2.75,-0.54,-0.14,0 +2022-05-01,2.06,2.87,2.9,-0.15,0.21,0 +2022-06-01,2.65,3.19,3.14,0.3,0.53,0 +2022-07-01,3.02,2.96,2.9,0.38,0.53,0 +2022-08-01,3.28,3.03,2.9,0.34,0.39,0 +2022-09-01,3.89,3.7,3.52,1.25,1.14,0 +2022-10-01,4.43,4.18,3.98,1.71,1.59,0 +2022-11-01,4.73,4.06,3.89,1.61,1.52,0 +2022-12-01,4.68,3.76,3.62,1.45,1.36,0 +2023-01-01,4.69,3.64,3.53,1.41,1.29,0 +2023-02-01,4.93,3.94,3.75,1.5,1.41,0 +2023-03-01,4.68,3.82,3.66,1.45,1.36,0 +2023-04-01,4.68,3.54,3.46,1.23,1.19,0 +2023-05-01,4.91,3.59,3.57,1.44,1.36,0 +2023-06-01,5.24,3.95,3.75,1.81,1.55,0 +2023-07-01,5.37,4.14,3.9,1.93,1.6,0 +2023-08-01,5.37,4.31,4.17,2.07,1.83,0 +2023-09-01,5.44,4.49,4.38,2.23,2.04,0 +2023-10-01,5.42,4.77,4.8,2.46,2.41,0 +2023-11-01,5.28,4.49,4.5,2.24,2.2,0 +2023-12-01,4.96,4.0,4.02,1.88,1.84,0 +2024-01-01,4.79,3.98,4.06,1.76,1.79,0 +2024-02-01,4.92,4.19,4.21,1.87,1.93,0 +2024-03-01,4.99,4.2,4.21,1.82,1.9,0 +2024-04-01,5.14,4.56,4.54,2.11,2.15,0 +2024-05-01,5.16,4.5,4.48,2.17,2.15,0 +2024-06-01,5.11,4.32,4.31,2.1,2.05,0 +2024-07-01,4.9,4.16,4.25,1.98,1.97,0 +2024-08-01,4.43,3.71,3.87,1.74,1.76,0 +2024-09-01,4.03,3.5,3.72,1.53,1.62,0 +2024-10-01,4.2,3.91,4.1,1.68,1.81,0 +2024-11-01,4.33,4.23,4.36,1.84,2.03,0 +2024-12-01,4.23,4.25,4.39,1.89,2.09,0 diff --git a/lectures/affine_risk_prices.md b/lectures/affine_risk_prices.md index b769c97c3..e17231b32 100644 --- a/lectures/affine_risk_prices.md +++ b/lectures/affine_risk_prices.md @@ -40,7 +40,7 @@ $$ where $r_t = \rho + \gamma\mu - \frac{1}{2}\sigma_c^2\gamma^2$. This model asserts that exposure to the random part of aggregate consumption growth, -$\sigma_c\varepsilon_{t+1}$, is the *only* priced risk — the sole source of discrepancies +$\sigma_c\varepsilon_{t+1}$, is the *only* priced risk, the sole source of discrepancies among expected returns across assets. Empirical difficulties with this specification (the equity premium puzzle, the @@ -48,8 +48,10 @@ risk-free rate puzzle, and the Hansen-Jagannathan bounds discussed in {doc}`Doubts or Variability? `) motivate the alternative approach described in this lecture. +Put bluntly, the model to be studied in this lecture declares the Lucas asset pricing model's stochastic discount factor to be a failure. + The **affine model** maintains $\mathbb{E}(m_{t+1}R_{j,t+1}) = 1$ but *divorces* the -stochastic discount factor from consumption risk. +stochastic discount factor from consumption risk, and consequently, from much of macroeconomics too. Instead, it @@ -57,16 +59,21 @@ Instead, it * uses overidentifying restrictions from $\mathbb{E}(m_{t+1}R_{j,t+1}) = 1$ applied to $N$ assets to let the data reveal risks and their prices. +```{note} +Researchers including {cite}`bansal2004risks` and {cite}`hansen2008consumption` have been less willing +to give up on consumption-based models of the stochastic discount factor. +``` + Key applications we study include: -1. **Pricing risky assets** — how risk prices and exposures determine excess returns. -1. **Affine term structure models** — bond yields as affine functions of a state vector +1. *Pricing risky assets*: how risk prices and exposures determine excess returns. +2. *Affine term structure models*: bond yields as affine functions of a state vector ({cite:t}`AngPiazzesi2003`). -1. **Risk-neutral probabilities** — a change-of-measure representation of the pricing equation. -1. **Distorted beliefs** — reinterpreting risk price estimates when agents hold systematically +3. *Risk-neutral probabilities*: a change-of-measure representation of the pricing equation. +4. *Distorted beliefs*: reinterpreting risk price estimates when agents hold systematically biased forecasts ({cite:t}`piazzesi2015trend`); see also {doc}`Risk Aversion or Mistaken Beliefs? `. -We start with some standard imports: +We start with the following imports: ```{code-cell} ipython3 import numpy as np @@ -81,7 +88,7 @@ from numpy.linalg import eigvals The model has two components. -**Component 1** is a vector autoregression that describes the state of the economy +*Component 1* is a vector autoregression that describes the state of the economy and the evolution of the short rate: ```{math} @@ -103,10 +110,10 @@ Here * $\varepsilon_{t+1} \sim \mathcal{N}(0, I)$ is an i.i.d. $m \times 1$ random vector, * $z_t$ is an $m \times 1$ state vector. -Equation {eq}`eq_shortrate` says that the **short rate** $r_t$ — the net yield on a -one-period risk-free claim — is an affine function of the state $z_t$. +Equation {eq}`eq_shortrate` says that the **short rate** $r_t$, the net yield on a +one-period risk-free claim, is an affine function of the state $z_t$. -**Component 2** is a vector of **risk prices** $\lambda_t$ and an associated stochastic +*Component 2* is a vector of **risk prices** $\lambda_t$ and an associated stochastic discount factor $m_{t+1}$: ```{math} @@ -130,6 +137,43 @@ to each risk component affect expected returns (as we show below). Because $\lambda_t$ is affine in $z_t$, the stochastic discount factor $m_{t+1}$ is **exponential quadratic** in the state $z_t$. +We implement the model components as follows. + +```{code-cell} ipython3 +AffineModel = namedtuple('AffineModel', + ('μ', 'φ', 'C', 'δ_0', 'δ_1', 'λ_0', 'λ_z', 'm', 'φ_rn', 'μ_rn')) + +def create_affine_model(μ, φ, C, δ_0, δ_1, λ_0, λ_z): + """Create an affine term structure model.""" + μ = np.asarray(μ, float) + φ = np.asarray(φ, float) + C = np.asarray(C, float) + δ_1 = np.asarray(δ_1, float) + λ_0, λ_z = np.asarray(λ_0, float), np.asarray(λ_z, float) + return AffineModel(μ=μ, φ=φ, C=C, δ_0=float(δ_0), δ_1=δ_1, + λ_0=λ_0, λ_z=λ_z, m=len(μ), + φ_rn=φ - C @ λ_z, μ_rn=μ - C @ λ_0) + +def simulate(model, z0, T, rng=None): + """Simulate z_{t+1} = μ + φ z_t + C ε_{t+1} for T periods.""" + if rng is None: + rng = np.random.default_rng(42) + Z = np.zeros((T + 1, model.m)) + Z[0] = z0 + for t in range(T): + ε = rng.standard_normal(model.m) + Z[t + 1] = model.μ + model.φ @ Z[t] + model.C @ ε + return Z + +def short_rate(model, z): + """Compute r_t = δ_0 + δ_1^⊤ z_t.""" + return model.δ_0 + model.δ_1 @ z + +def risk_prices(model, z): + """Compute λ_t = λ_0 + λ_z z_t.""" + return model.λ_0 + model.λ_z @ z +``` + ### Properties of the SDF Since $\lambda_t^\top\varepsilon_{t+1}$ is conditionally normal, it follows that @@ -138,18 +182,87 @@ $$ \mathbb{E}_t(m_{t+1}) = \exp(-r_t) $$ -and +and + +$$ +\text{std}_t(m_{t+1}) \approx \| \lambda_t \|. +$$ + +```{exercise} +:label: arp_ex1 + +Show that the SDF defined in {eq}`eq_sdf` satisfies + +$$ +\mathbb{E}_t(m_{t+1}) = \exp(-r_t) +$$ + +and + +$$ +\text{std}_t(m_{t+1}) \approx \| \lambda_t \| +$$ + +where $\| \lambda_t \| = \sqrt{\lambda_t^\top\lambda_t}$ denotes the Euclidean norm of the risk price vector. + +For the second result, use the lognormal variance formula and the approximations $\exp(x) \approx 1 + x$ and $\exp(-r_t) \approx 1$ for small $x$ and $r_t$. +``` + +```{solution-start} arp_ex1 +:class: dropdown +``` + +From {eq}`eq_sdf`, we have + +$$ +m_{t+1} = \exp\left(-r_t - \frac{1}{2}\lambda_t^\top\lambda_t - \lambda_t^\top\varepsilon_{t+1}\right) +$$ + + +Since $-\lambda_t^\top \varepsilon_{t+1} \sim \mathcal{N}(0, \lambda_t^\top \lambda_t)$, we have +$\mathbb{E}_t[\exp(-\lambda_t^\top \varepsilon_{t+1})] = \exp\left(\frac{1}{2}\lambda_t^\top \lambda_t\right)$. + +Therefore, + +$$ +\mathbb{E}_t(m_{t+1}) = \exp(-r_t - \frac{1}{2}\lambda_t^\top\lambda_t) \mathbb{E}_t[\exp(-\lambda_t^\top\varepsilon_{t+1})] = \exp(-r_t) +$$ + +$m_{t+1}$ is conditionally lognormal with $\log m_{t+1} \sim \mathcal{N}(-r_t-\frac{1}{2}\lambda_t^\top\lambda_t, \lambda_t^\top \lambda_t)$. + +By the lognormal variance formula +$\text{Var}(\exp(X)) = (\exp(\sigma^2) - 1) \exp(2\mu + \sigma^2)$ for $X \sim \mathcal{N}(\mu, \sigma^2)$, we have $$ -\text{std}_t(m_{t+1}) \approx |\lambda_t|. +\begin{aligned} +\text{Var}_t(m_{t+1}) &= (\exp(\lambda_t^\top \lambda_t) - 1) \exp(-2r_t) \\ +&\approx \lambda_t^\top \lambda_t \exp(-2r_t) +\end{aligned} $$ +by the approximation $\exp(x) \approx 1 + x$ for small $x$. + +Hence, + +$$ +\text{std}_t(m_{t+1}) \approx \| \lambda_t \| \exp(-r_t) +$$ + +With $\exp(-r_t) \approx 1$ for small $r_t$, we obtain + +$$ +\text{std}_t(m_{t+1}) \approx \| \lambda_t \| +$$ + +```{solution-end} +``` + The first equation confirms that $r_t$ is the net yield on a risk-free one-period bond. That is why $r_t$ is called **the short rate** in the exponential quadratic literature. The second equation says that the conditional standard deviation of the SDF -is approximately the magnitude of the vector of risk prices — a measure of overall +is approximately the magnitude of the vector of risk prices, a measure of overall **market price of risk**. ## Pricing risky assets @@ -178,7 +291,7 @@ The components of $\alpha_t(j)$ express the **exposures** of $\log R_{j,t+1}$ to corresponding components of the risk vector $\varepsilon_{t+1}$. The specification {eq}`eq_return` implies $\mathbb{E}_t R_{j,t+1} = \exp(\nu_t(j))$, -so $\nu_t(j)$ is the expected net log return. +so $\nu_t(j)$ is the log of the expected gross return. ### Expected excess returns @@ -191,11 +304,48 @@ formula for the mean of a lognormal random variable gives \nu_t(j) = r_t + \alpha_t(j)^\top\lambda_t ``` +```{exercise} +:label: arp_ex2 + +Using the SDF {eq}`eq_sdf` and the return specification {eq}`eq_return`, derive the expected excess return formula {eq}`eq_excess`: + +$$ +\nu_t(j) = r_t + \alpha_t(j)^\top\lambda_t +$$ + +*Hint:* Start by computing $\log(m_{t+1} R_{j,t+1})$, identify its conditional distribution, and apply the pricing condition $\mathbb{E}_t(m_{t+1}R_{j,t+1}) = 1$. +``` + +```{solution-start} arp_ex2 +:class: dropdown +``` + +Combining {eq}`eq_sdf` and {eq}`eq_return`, we get + +$$ +\log(m_{t+1} R_{j,t+1}) = -r_t + \nu_t(j) - \frac{1}{2}\lambda_t^\top\lambda_t - \frac{1}{2}\alpha_t(j)^\top\alpha_t(j) + (\alpha_t(j) - \lambda_t)^\top\varepsilon_{t+1} +$$ + +This is conditionally normal with mean $\mu = -r_t + \nu_t(j) - \frac{1}{2}\lambda_t^\top\lambda_t - \frac{1}{2}\alpha_t(j)^\top\alpha_t(j)$ and variance $\sigma^2 = (\alpha_t(j) - \lambda_t)^\top(\alpha_t(j) - \lambda_t)$. + +Since $\mathbb{E}_t[\exp(X)] = \exp(\mu + \frac{1}{2}\sigma^2)$ for $X \sim \mathcal{N}(\mu, \sigma^2)$, the pricing condition $\mathbb{E}_t(m_{t+1}R_{j,t+1}) = 1$ requires $\mu + \frac{1}{2}\sigma^2 = 0$. + +Expanding $\frac{1}{2}\sigma^2 = \frac{1}{2}\alpha_t(j)^\top\alpha_t(j) - \alpha_t(j)^\top\lambda_t + \frac{1}{2}\lambda_t^\top\lambda_t$ and adding to $\mu$, the $\frac{1}{2}\lambda_t^\top\lambda_t$ and $\frac{1}{2}\alpha_t(j)^\top\alpha_t(j)$ terms cancel, leaving + +$$ +-r_t + \nu_t(j) - \alpha_t(j)^\top\lambda_t = 0 +$$ + +which gives {eq}`eq_excess`. + +```{solution-end} +``` + This is a central result. It says: -> The expected net return on asset $j$ equals the short rate plus the inner product +> The log expected gross return on asset $j$ equals the short rate plus the inner product > of the asset's exposure vector $\alpha_t(j)$ with the risk price vector $\lambda_t$. Each component of $\lambda_t$ prices the corresponding component of $\varepsilon_{t+1}$. @@ -240,29 +390,102 @@ The recursion {eq}`eq_bondrecur` has an **exponential affine** solution: ```{math} :label: eq_bondprice -p_t(n) = \exp\!\bigl(\bar A_n + \bar B_n^\top z_t\bigr) +p_t(n) = \exp \bigl(\bar A_n + \bar B_n^\top z_t\bigr) ``` where the scalar $\bar A_n$ and the $m \times 1$ vector $\bar B_n$ satisfy the **Riccati difference equations** ```{math} -:label: eq_riccati_A +:label: eq_riccati_a \bar A_{n+1} = \bar A_n + \bar B_n^\top(\mu - C\lambda_0) + \frac{1}{2}\bar B_n^\top CC^\top\bar B_n - \delta_0 ``` ```{math} -:label: eq_riccati_B +:label: eq_riccati_b \bar B_{n+1}^\top = \bar B_n^\top(\phi - C\lambda_z) - \delta_1^\top ``` with initial conditions $\bar A_1 = -\delta_0$ and $\bar B_1 = -\delta_1$. +```{exercise} +:label: arp_ex3 + +Derive the Riccati difference equations {eq}`eq_riccati_a` and {eq}`eq_riccati_b` +by substituting the conjectured bond price {eq}`eq_bondprice` into the pricing +recursion {eq}`eq_bondrecur` and matching coefficients. + +*Hint:* Substitute $p_{t+1}(n) = \exp(\bar A_n + \bar B_n^\top z_{t+1})$ and +$\log m_{t+1}$ from {eq}`eq_sdf` into {eq}`eq_bondrecur`. + +Use the state +dynamics {eq}`eq_var` to express $z_{t+1}$ in terms of $z_t$ and +$\varepsilon_{t+1}$, then evaluate the conditional expectation using the +lognormal moment generating function. +``` + +```{solution-start} arp_ex3 +:class: dropdown +``` + +We want to show that if $p_t(n) = \exp(\bar A_n + \bar B_n^\top z_t)$, +then the recursion $p_t(n+1) = \mathbb{E}_t(m_{t+1}\, p_{t+1}(n))$ yields +$p_t(n+1) = \exp(\bar A_{n+1} + \bar B_{n+1}^\top z_t)$ with +$\bar A_{n+1}$ and $\bar B_{n+1}$ given by {eq}`eq_riccati_a` and +{eq}`eq_riccati_b`. + + +From {eq}`eq_sdf` and {eq}`eq_bondprice`, + +$$ +\log(m_{t+1}\, p_{t+1}(n)) = -r_t - \frac{1}{2}\lambda_t^\top\lambda_t - \lambda_t^\top\varepsilon_{t+1} + \bar A_n + \bar B_n^\top z_{t+1} +$$ + +Substituting $z_{t+1} = \mu + \phi z_t + C\varepsilon_{t+1}$ from {eq}`eq_var` +and $r_t = \delta_0 + \delta_1^\top z_t$ from {eq}`eq_shortrate` gives + +$$ +\log(m_{t+1}\, p_{t+1}(n)) = \bar A_n + \bar B_n^\top\mu - \delta_0 + (\bar B_n^\top\phi - \delta_1^\top) z_t - \frac{1}{2}\lambda_t^\top\lambda_t + (\bar B_n^\top C - \lambda_t^\top)\varepsilon_{t+1} +$$ + + +Since $\varepsilon_{t+1} \sim \mathcal{N}(0, I)$, and writing the exponent as $a + b^\top\varepsilon_{t+1}$ where +$b = C^\top \bar B_n - \lambda_t$, we have + +$$ +\mathbb{E}_t[\exp(a + b^\top\varepsilon_{t+1})] = \exp\left(a + \frac{1}{2}b^\top b\right) +$$ + +Computing $\frac{1}{2}b^\top b$: + +$$ +\frac{1}{2}(\bar B_n^\top C - \lambda_t^\top)(\bar B_n^\top C - \lambda_t^\top)^\top = \frac{1}{2}\bar B_n^\top CC^\top \bar B_n - \bar B_n^\top C\lambda_t + \frac{1}{2}\lambda_t^\top\lambda_t +$$ + +The $\frac{1}{2}\lambda_t^\top\lambda_t$ cancels with the $-\frac{1}{2}\lambda_t^\top\lambda_t$ already in $a$, and $-\bar B_n^\top C\lambda_t = -\bar B_n^\top C(\lambda_0 + \lambda_z z_t)$. + + +$$ +\log p_t(n+1) = \underbrace{\bar A_n + \bar B_n^\top(\mu - C\lambda_0) + \frac{1}{2}\bar B_n^\top CC^\top \bar B_n - \delta_0}_{\bar A_{n+1}} + \underbrace{(\bar B_n^\top(\phi - C\lambda_z) - \delta_1^\top)}_{\bar B_{n+1}^\top} z_t +$$ + +Matching the constant and the coefficient on $z_t$ gives the Riccati +equations {eq}`eq_riccati_a` and {eq}`eq_riccati_b`. + +Setting $n = 0$ with $p_t(1) = \exp(-r_t) = \exp(-\delta_0 - \delta_1^\top z_t)$ gives $\bar A_1 = -\delta_0$ and $\bar B_1 = -\delta_1$. + +```{solution-end} +``` + ### Yields -The **yield to maturity** on an $n$-period bond is +The **yield to maturity** on an $n$-period bond is the constant rate $y$ +at which one would discount the face value to obtain the observed price, +i.e., $p_t(n) = e^{-n\,y}$. + +Solving for $y$ gives $$ y_t(n) = -\frac{\log p_t(n)}{n} @@ -282,26 +505,10 @@ where $A_n = -\bar A_n / n$ and $B_n = -\bar B_n / n$. This is the defining property of affine term structure models. -## Python implementation - -We now implement the affine term structure model and compute bond prices, yields, -and risk premiums numerically. +We now implement the bond pricing formulas {eq}`eq_riccati_a`, {eq}`eq_riccati_b`, +and {eq}`eq_yield`. ```{code-cell} ipython3 -AffineModel = namedtuple('AffineModel', - ('μ', 'φ', 'C', 'δ_0', 'δ_1', 'λ_0', 'λ_z', 'm', 'φ_rn', 'μ_rn')) - -def create_affine_model(μ, φ, C, δ_0, δ_1, λ_0, λ_z): - """Create an affine term structure model.""" - μ = np.asarray(μ, float) - φ = np.asarray(φ, float) - C = np.asarray(C, float) - δ_1 = np.asarray(δ_1, float) - λ_0, λ_z = np.asarray(λ_0, float), np.asarray(λ_z, float) - return AffineModel(μ=μ, φ=φ, C=C, δ_0=float(δ_0), δ_1=δ_1, - λ_0=λ_0, λ_z=λ_z, m=len(μ), - φ_rn=φ - C @ λ_z, μ_rn=μ - C @ λ_0) - def bond_coefficients(model, n_max): """Compute (A_bar_n, B_bar_n) for n = 1, ..., n_max.""" A_bar = np.zeros(n_max + 1) @@ -319,39 +526,27 @@ def bond_coefficients(model, n_max): def compute_yields(model, z, n_max): """Compute yield curve y_t(n) for n = 1, ..., n_max.""" A_bar, B_bar = bond_coefficients(model, n_max) - ns = np.arange(1, n_max + 1) - return np.array([(-A_bar[n] - B_bar[n] @ z) / n for n in ns]) + return np.array([(-A_bar[n] - B_bar[n] @ z) / n + for n in range(1, n_max + 1)]) def bond_prices(model, z, n_max): """Compute bond prices p_t(n) for n = 1, ..., n_max.""" A_bar, B_bar = bond_coefficients(model, n_max) return np.array([np.exp(A_bar[n] + B_bar[n] @ z) for n in range(1, n_max + 1)]) - -def simulate(model, z0, T, rng=None): - """Simulate the state process for T periods.""" - if rng is None: - rng = np.random.default_rng(42) - Z = np.zeros((T + 1, model.m)) - Z[0] = z0 - for t in range(T): - ε = rng.standard_normal(model.m) - Z[t + 1] = model.μ + model.φ @ Z[t] + model.C @ ε - return Z - -def short_rate(model, z): - """Compute r_t = δ_0 + δ_1^⊤ z_t.""" - return model.δ_0 + model.δ_1 @ z - -def risk_prices(model, z): - """Compute λ_t = λ_0 + λ_z z_t.""" - return model.λ_0 + model.λ_z @ z ``` ### A one-factor Gaussian example To build intuition, we start with a single-factor ($m=1$) Gaussian model. +With $m = 1$, the state $z_t$ follows an AR(1) process +$z_{t+1} = \mu + \phi z_t + C\varepsilon_{t+1}$. + +The unconditional standard +deviation of $z_t$ is $\sigma_z = C / \sqrt{1 - \phi^2}$, which determines +the range of short rates the model generates via $r_t = \delta_0 + \delta_1 z_t$. + ```{code-cell} ipython3 # One-factor Gaussian model (quarterly) μ = np.array([0.0]) @@ -359,30 +554,23 @@ To build intuition, we start with a single-factor ($m=1$) Gaussian model. C = np.array([[1.0]]) δ_0 = 0.01 # 1%/quarter ≈ 4% p.a. δ_1 = np.array([0.001]) -λ_0 = np.array([0.05]) -λ_z = np.array([[-0.01]]) # countercyclical +λ_0 = np.array([-0.05]) +λ_z = np.array([[-0.01]]) model_1f = create_affine_model(μ, φ, C, δ_0, δ_1, λ_0, λ_z) - -φ_Q = model_1f.φ_rn[0, 0] -half_life = np.log(2) / (-np.log(φ[0, 0])) -σ_z = 1.0 / np.sqrt(1 - φ[0, 0]**2) -print(f"Physical AR(1): φ = {φ[0,0]:.3f}" - f" (half-life {half_life:.1f} quarters)") -print(f"Risk-neutral AR(1): φ^Q = {φ_Q:.3f} " - f"({'stable' if abs(φ_Q) < 1 else 'UNSTABLE'})") -print(f"Unconditional std of z: σ_z = {σ_z:.2f}") -r_mean = short_rate(model_1f, np.array([0.0])) * 4 * 100 -print(f"Mean short rate = {r_mean:.1f}% p.a.") -print(f"Short rate range (±2σ): [{(δ_0-δ_1[0]*2*σ_z)*4*100:.1f}%, " - f"{(δ_0+δ_1[0]*2*σ_z)*4*100:.1f}%] p.a.") ``` ### Yield curve shapes -We compute yield curves across a range of short-rate states $z_t$. +We compute yield curves $y_t(n)$ across a range of short-rate states $z_t$. ```{code-cell} ipython3 +--- +mystnb: + figure: + caption: Yield curves under the one-factor affine model + name: fig-yield-curves-1f +--- n_max_1f = 60 maturities_1f = np.arange(1, n_max_1f + 1) @@ -396,31 +584,37 @@ r_low = short_rate(model_1f, z_low) * 4 * 100 r_mid = short_rate(model_1f, z_mid) * 4 * 100 r_high = short_rate(model_1f, z_high) * 4 * 100 -for z, label, color in [ - (z_low, f"Low state (r₁ = {r_low:.1f}%)", - "steelblue"), - (z_mid, f"Median state (r₁ = {r_mid:.1f}%)", - "seagreen"), - (z_high, f"High state (r₁ = {r_high:.1f}%)", - "firebrick"), +for z, label in [ + (z_low, f"Low state ($y_t(1) = ${r_low:.1f}%)"), + (z_mid, f"Median state ($y_t(1) = ${r_mid:.1f}%)"), + (z_high, f"High state ($y_t(1) = ${r_high:.1f}%)"), ]: y = compute_yields(model_1f, z, n_max_1f) * 4 * 100 - ax.plot(maturities_1f, y, color=color, lw=2.2, label=label) - ax.plot(1, y[0], 'o', color=color, ms=7, zorder=5) + line, = ax.plot(maturities_1f, y, lw=2.2, label=label) + ax.plot(1, y[0], 'o', color=line.get_color(), ms=7, zorder=5) r_bar = short_rate(model_1f, np.array([0.0])) * 4 * 100 ax.axhline(r_bar, color='grey', ls=':', lw=1.2, alpha=0.7, label=f"Mean short rate ({r_bar:.1f}%)") +# Long-run yield: B_bar_n converges, so y_inf = lim -A_bar_n / n +φ_Cλ = (model_1f.φ_rn)[0, 0] # φ - Cλ_z (scalar) +B_inf = -model_1f.δ_1[0] / (1 - φ_Cλ) # fixed point of B recursion +A_increment = (B_inf * model_1f.μ_rn[0] + + 0.5 * B_inf**2 * (model_1f.C @ model_1f.C.T)[0, 0] + - model_1f.δ_0) +y_inf = -A_increment * 4 * 100 # annualised % +ax.axhline(y_inf, color='black', ls='--', lw=1.2, alpha=0.7, + label=f"Long-run yield ({y_inf:.1f}%)") + ax.set_xlabel("Maturity (quarters)") ax.set_ylabel("Yield (% per annum)") -ax.set_title("Yield Curves — One-Factor Affine Model") ax.legend(fontsize=10, loc='best') ax.set_xlim(1, n_max_1f) ax2 = ax.twiny() ax2.set_xlim(ax.get_xlim()) -year_ticks = [4, 8, 12, 20, 28, 40, 60] +year_ticks = [4, 20, 40, 60] ax2.set_xticks(year_ticks) ax2.set_xticklabels([f"{t/4:.0f}y" for t in year_ticks]) ax2.set_xlabel("Maturity (years)") @@ -429,12 +623,79 @@ plt.tight_layout() plt.show() ``` -The model generates upward-sloping, flat, and inverted yield curves as the short -rate moves across states — a key qualitative feature of observed bond markets. +When the short rate is low, the yield curve is +upward-sloping, while when the short rate is high, it is downward-sloping. + +All three curves converge to the same long-run yield $y_\infty$ at long +maturities, and the long-run yield lies above the mean short rate +$\delta_0$. + +````{exercise} +:label: arp_ex4 + +Show that the long-run yield satisfies + +```{math} +:label: eq_y_inf + +y_\infty + = \delta_0 + - \bar B_\infty^\top(\mu - C\lambda_0) + - \tfrac{1}{2}\bar B_\infty^\top CC^\top \bar B_\infty +``` + +where $\bar B_\infty = -(I - (\phi - C\lambda_z)^\top)^{-1} \delta_1$ +is the fixed point of the recursion {eq}`eq_riccati_b`. + +Then explain why $y_\infty > \delta_0$ under this parameterization. + +*Hint:* Use {eq}`eq_yield` and the Riccati equations +{eq}`eq_riccati_a`--{eq}`eq_riccati_b`. For the inequality, consider +each subtracted term separately. +```` + +```{solution-start} arp_ex4 +:class: dropdown +``` + + +The recursion {eq}`eq_riccati_b` is a linear difference equation $\bar B_{n+1} = (\phi - C\lambda_z)^\top \bar B_n - \delta_1$. + +When $\phi - C\lambda_z$ has eigenvalues inside the unit circle, $\bar B_n$ converges to $\bar B_\infty = -(I - (\phi - C\lambda_z)^\top)^{-1} \delta_1$. + +Since $\bar B_\infty$ is finite, $\bar B_n^\top z_t / n \to 0$ in {eq}`eq_yield`, so $y_t(n) \to \lim_{n\to\infty} -\bar A_n / n$ regardless of $z_t$. + +To find this limit, write $\bar A_n = \bar A_1 + \sum_{k=1}^{n-1}(\bar A_{k+1} - \bar A_k)$. + +By {eq}`eq_riccati_a`, each increment depends on $\bar B_k$, which converges to $\bar B_\infty$, so the increment converges to $L \equiv \bar B_\infty^\top(\mu - C\lambda_0) + \tfrac{1}{2}\bar B_\infty^\top CC^\top \bar B_\infty - \delta_0$. + +Therefore $\bar A_n / n \to L$ and $y_\infty = -L$, giving {eq}`eq_y_inf`. + +To see why $y_\infty > \delta_0$, note that the two subtracted terms in {eq}`eq_y_inf` have opposite signs under this parameterization. + +The quadratic term $\tfrac{1}{2}\bar B_\infty^\top CC^\top \bar B_\infty = \tfrac{1}{2}\|C^\top \bar B_\infty\|^2 \geq 0$ always. -### Short rate dynamics +This is a **convexity effect** from Jensen's inequality that pushes $y_\infty$ below $\delta_0$. + +The linear term $\bar B_\infty^\top(\mu - C\lambda_0)$ is negative because $\bar B_\infty < 0$ (since $\delta_1 > 0$) while $\mu - C\lambda_0 > 0$ (since $\lambda_0 < 0$). Subtracting this negative quantity raises $y_\infty$ above $\delta_0$. + +This is a **risk-premium effect**: positive term premiums tilt the average yield curve upward. + +Under this parameterization the risk-premium effect dominates the convexity effect, so $y_\infty > \delta_0$. + +```{solution-end} +``` + + +Let's also simulate the short rate path: ```{code-cell} ipython3 +--- +mystnb: + figure: + caption: Simulated short rate path + name: fig-simulated-short-rate +--- T = 200 Z = simulate(model_1f, np.array([0.0]), T) short_rates = np.array([short_rate(model_1f, Z[t]) * 4 * 100 @@ -443,14 +704,13 @@ r_bar_pct = short_rate(model_1f, np.array([0.0])) * 4 * 100 fig, ax = plt.subplots(figsize=(10, 4)) quarters = np.arange(T + 1) -ax.plot(quarters, short_rates, color="steelblue", lw=1.3) -ax.axhline(r_bar_pct, color="red", ls="--", lw=1.3, +line, = ax.plot(quarters, short_rates, lw=1.3) +ax.axhline(r_bar_pct, ls="--", lw=1.3, label=f"Unconditional mean ({r_bar_pct:.1f}%)") ax.fill_between(quarters, short_rates, r_bar_pct, - alpha=0.08, color="steelblue") + alpha=0.08, color=line.get_color()) ax.set_xlabel("Quarter") ax.set_ylabel("Short rate (% p.a.)") -ax.set_title("Simulated Short Rate — One-Factor Model (50 years)") ax.set_xlim(0, T) ax.legend(fontsize=11) plt.tight_layout() @@ -459,10 +719,43 @@ plt.show() ### A two-factor model -To match richer yield-curve dynamics, practitioners routinely use $m \geq 2$ factors. +To match richer yield-curve dynamics, practitioners routinely use $m \geq 2$ +factors. -We now introduce a two-factor specification in which the factors -can be interpreted as a **level** component and a **slope** component. +We now introduce a two-factor specification with state +$z_t = (z_{1t},\, z_{2t})^\top$, where + +$$ +z_{t+1} = \mu + \phi\, z_t + C\,\varepsilon_{t+1}, +\qquad +\phi = \begin{pmatrix} 0.97 & -0.03 \\ 0 & 0.90 \end{pmatrix}, +\qquad +C = I_2 +$$ + +The first factor $z_{1t}$ is highly persistent ($\phi_{11} = 0.97$) and +drives most of the variation in the short rate through $\delta_1$, so we +interpret it as a **level** factor. + +The second factor $z_{2t}$ mean-reverts faster ($\phi_{22} = 0.90$) and +affects the short rate with a smaller loading, capturing the **slope** +of the yield curve. + +The off-diagonal entry $\phi_{12} = -0.03$ allows the level factor to +respond to the current slope state $z_{2t}$. + +The short rate is $r_t = \delta_0 + \delta_1^\top z_t$ with +$\delta_1 = (0.002,\; 0.001)^\top$, so both factors raise the short +rate when positive, but the level factor has twice the impact. + +Risk prices are $\lambda_t = \lambda_0 + \lambda_z z_t$ with +$\lambda_0 = (-0.01,\; -0.005)^\top$ and +$\lambda_z = \text{diag}(-0.005,\, -0.003)$. + +The negative diagonal entries of $\lambda_z$ make $\phi - C\lambda_z$ have larger +eigenvalues than $\phi$, so the state is more persistent under the +risk-neutral measure and the yield curve is more sensitive to the +current state at long horizons. ```{code-cell} ipython3 # Two-factor model: z = [level, slope] @@ -472,28 +765,27 @@ can be interpreted as a **level** component and a **slope** component. C_2 = np.eye(2) δ_0_2 = 0.01 δ_1_2 = np.array([0.002, 0.001]) -λ_0_2 = np.array([0.01, 0.005]) +λ_0_2 = np.array([-0.01, -0.005]) λ_z_2 = np.array([[-0.005, 0.0], [ 0.0, -0.003]]) model_2f = create_affine_model(μ_2, φ_2, C_2, δ_0_2, δ_1_2, λ_0_2, λ_z_2) -print("Physical measure VAR:") -print(f" φ =\n{φ_2}") -print(f" eigenvalues of φ: {eigvals(φ_2).real.round(4)}") -print() -print("Risk-neutral measure VAR:") -print(f" φ^Q = φ - Cλ_z =\n{model_2f.φ_rn.round(4)}") -eigs_Q = eigvals(model_2f.φ_rn).real -stable = all(abs(e) < 1 for e in eigs_Q) -status = "stable" if stable else "UNSTABLE" -print(f" eigenvalues of φ^Q: {eigs_Q.round(4)}" - f" ({status})") -print() -print("Risk prices make Q dynamics more persistent than P dynamics.") +print(f"Eigenvalues of φ: {eigvals(φ_2).real.round(4)}") +print(f"Eigenvalues of φ - Cλ_z: {eigvals(model_2f.φ_rn).real.round(4)}") ``` +This confirms that the eigenvalues of $\phi - C\lambda_z$ are larger than those of $\phi$, so the state is more persistent under the risk-neutral measure. + +The following figure shows yield curves across different states of the world, as well as the factor loadings $B_{n,1}$ and $B_{n,2}$ that determine how yields load on the level and slope factors at each maturity + ```{code-cell} ipython3 +--- +mystnb: + figure: + caption: Yield curves and factor loadings under the two-factor model + name: fig-yield-curves-2f +--- n_max_2f = 60 maturities_2f = np.arange(1, n_max_2f + 1) @@ -505,20 +797,15 @@ states = { fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(14, 5.5)) -colors_2f = ["seagreen", "steelblue", "firebrick"] -for (label, z), color in zip(states.items(), colors_2f): +for label, z in states.items(): r_now = short_rate(model_2f, z) * 4 * 100 y = compute_yields(model_2f, z, n_max_2f) * 4 * 100 - ax1.plot(maturities_2f, y, lw=2.2, color=color, - label=f"{label} (r₁ = {r_now:.1f}%)") - ax1.plot(1, y[0], 'o', color=color, ms=7, zorder=5) + line, = ax1.plot(maturities_2f, y, lw=2.2, + label=f"{label} (r₁ = {r_now:.1f}%)") + ax1.plot(1, y[0], 'o', color=line.get_color(), ms=7, zorder=5) -ax1.annotate("Curves converge as\nmean reversion dominates", - xy=(50, 3.8), fontsize=9, color="gray", ha='center', - style='italic') ax1.set_xlabel("Maturity (quarters)") ax1.set_ylabel("Yield (% p.a.)") -ax1.set_title("Yield Curves — Two-Factor Model") ax1.legend(fontsize=10) ax1.set_xlim(1, n_max_2f) @@ -526,19 +813,15 @@ A_bar, B_bar = bond_coefficients(model_2f, n_max_2f) ns = np.arange(1, n_max_2f + 1) B_n = np.array([-B_bar[n] / n for n in ns]) -ax2.plot(ns, B_n[:, 0], lw=2.2, color="purple", +ax2.plot(ns, B_n[:, 0], lw=2.2, label=r"Level loading $B_{n,1}$") -ax2.plot(ns, B_n[:, 1], lw=2.2, color="orange", +ax2.plot(ns, B_n[:, 1], lw=2.2, label=r"Slope loading $B_{n,2}$") ax2.axhline(0, color='black', lw=0.6) ax2.set_xlabel("Maturity (quarters)") ax2.set_ylabel(r"Yield loading $B_{n,k}$") -ax2.set_title("Factor Loadings on Yields") ax2.legend(fontsize=11) ax2.set_xlim(1, n_max_2f) -ax2.annotate("Level factor stays\nimportant at long maturities", - xy=(45, B_n[44, 0]), fontsize=9, color="purple", - ha='center', va='bottom') for ax in (ax1, ax2): ax_top = ax.twiny() @@ -551,53 +834,162 @@ plt.tight_layout() plt.show() ``` +We can see that the level factor dominates at long maturities. + ## Risk premiums -A key object in the affine term structure model is the **term premium** — the extra -expected return on a long-term bond relative to rolling over short-term bonds. +A key object in the affine term structure model is the **term premium**, the +expected excess return on a long-term bond relative to rolling over short-term bonds. + +For an $(n+1)$-period bond held for one period, the shock loading is +$\alpha_n = C^\top \bar B_n$, so {eq}`eq_excess` gives + +$$ +\log \mathbb{E}_t R_{t+1}^{(n+1)} - r_t \;=\; \bar B_n^\top C \lambda_t +$$ + +The term premium equals the inner product of the bond's shock exposure +$\bar B_n^\top C$ with the risk price vector $\lambda_t$. + +Because the term premium equals $\bar B_n^\top C \lambda_t$, its sign +depends on the *current* risk-price vector $\lambda_t$, which is +state-dependent whenever $\lambda_z \neq 0$. + +To see this more concretely, consider a state where $C\lambda_t$ is negative +componentwise (for example, $z_t = 0$ in our calibration below). + +When $\delta_1 > 0$, a positive shock $\varepsilon_{t+1}$ raises the +short rate and lowers long-bond prices, so the bond shock loading +$\alpha_n = C^\top \bar B_n$ is negative. + +A negative $C\lambda_t$ then means the stochastic discount factor +$m_{t+1}$ loads positively on $\varepsilon_{t+1}$, i.e. the SDF is +high in states where interest rates rise and bond prices fall. + +This makes $\text{Cov}_t(m_{t+1}, R_{t+1}^{(n+1)}) < 0$, so long bonds +are risky and carry a positive term premium. + +Algebraically, $\bar B_n < 0$ and $C\lambda_t < 0$ combine +to give $\bar B_n^\top C \lambda_t > 0$. + +In other states, however, $\lambda_t$ may change sign (e.g. the +first component flips in the low-rate regime of our two-state +calibration), and long-bond term premiums can become negative at +longer maturities. + +```{exercise} +:label: arp_ex5 + +Derive the term premium formula above by computing the one-period holding +return on an $(n+1)$-period bond and identifying its shock loading. + +*Hint:* Use $R_{t+1}^{(n+1)} = p_{t+1}(n)/p_t(n+1)$ with +$\log p_t(n) = \bar A_n + \bar B_n^\top z_t$, substitute the state +dynamics {eq}`eq_var`, and apply the Riccati equations +{eq}`eq_riccati_a`--{eq}`eq_riccati_b` to simplify. +``` + +```{solution-start} arp_ex5 +:class: dropdown +``` + +The one-period holding return on an $(n+1)$-period bond is +$R_{t+1}^{(n+1)} = p_{t+1}(n)/p_t(n+1)$, so + +$$ +\log R_{t+1}^{(n+1)} = \bar A_n + \bar B_n^\top z_{t+1} - \bar A_{n+1} - \bar B_{n+1}^\top z_t +$$ + +Substituting $z_{t+1} = \mu + \phi z_t + C\varepsilon_{t+1}$ from {eq}`eq_var`: + +$$ += \underbrace{(\bar A_n + \bar B_n^\top \mu - \bar A_{n+1})}_{\text{constant}} + + \underbrace{(\bar B_n^\top \phi - \bar B_{n+1}^\top)}_{\text{loading on } z_t} z_t + + \underbrace{\bar B_n^\top C}_{\text{shock loading}}\, \varepsilon_{t+1} +$$ + +We now use the Riccati equations to simplify each piece. + +For the constant piece, {eq}`eq_riccati_a` gives +$\bar A_{n+1} = \bar A_n + \bar B_n^\top(\mu - C\lambda_0) + \tfrac{1}{2}\bar B_n^\top CC^\top \bar B_n - \delta_0$, so -For an $(n+1)$-period bond held for one period, the excess log return is -approximately +$$ +\bar A_n + \bar B_n^\top \mu - \bar A_{n+1} + = \bar B_n^\top C\lambda_0 - \tfrac{1}{2}\bar B_n^\top CC^\top \bar B_n + \delta_0 +$$ + +For the $z_t$ coefficient, {eq}`eq_riccati_b` gives +$\bar B_{n+1}^\top = \bar B_n^\top(\phi - C\lambda_z) - \delta_1^\top$, so + +$$ +\bar B_n^\top \phi - \bar B_{n+1}^\top = \bar B_n^\top C\lambda_z + \delta_1^\top +$$ + +Combining the pieces: + +$$ +\log R_{t+1}^{(n+1)} + = \underbrace{(\delta_0 + \delta_1^\top z_t)}_{r_t} + + \bar B_n^\top C\underbrace{(\lambda_0 + \lambda_z z_t)}_{\lambda_t} + - \tfrac{1}{2}\bar B_n^\top CC^\top \bar B_n + + \bar B_n^\top C\,\varepsilon_{t+1} +$$ + +Writing $\alpha_n = C^\top \bar B_n$, this takes the generic return form {eq}`eq_return`: $$ -\mathbb{E}_t\left[\log R_{t+1}^{(n+1)}\right] - r_t \;=\; -\bar B_n^\top C \lambda_t +\log R_{t+1}^{(n+1)} + = \underbrace{(r_t + \alpha_n^\top \lambda_t)}_{\nu_t} + - \tfrac{1}{2}\alpha_n^\top \alpha_n + + \alpha_n^\top \varepsilon_{t+1} $$ -That is, the term premium equals (minus) the product of the bond's exposure to -the shocks $(-\bar B_n^\top C)$ with the risk prices $\lambda_t$. +Since $\mathbb{E}_t R_{t+1}^{(n+1)} = \exp(\nu_t)$, we obtain + +$$ +\log \mathbb{E}_t R_{t+1}^{(n+1)} - r_t = \alpha_n^\top \lambda_t = \bar B_n^\top C \lambda_t +$$ + +```{solution-end} +``` + +The following figure plots term premiums across maturities for different states of the world, as well as the level and slope factor contributions to the term premium in the normal state ```{code-cell} ipython3 +--- +mystnb: + figure: + caption: Term premiums and factor decomposition under the two-factor model + name: fig-term-premiums-2f +--- def term_premiums(model, z, n_max): - """Approximate term premiums for maturities 1 to n_max.""" + """Compute term premiums for maturities 1 to n_max.""" A_bar, B_bar = bond_coefficients(model, n_max + 1) λ_t = risk_prices(model, z) - return np.array([-B_bar[n] @ model.C @ λ_t + return np.array([B_bar[n-1] @ model.C @ λ_t for n in range(1, n_max + 1)]) n_max_tp = 60 maturities_tp = np.arange(1, n_max_tp + 1) z_states_tp = { - "Low rate (z₁ < 0)": np.array([-3.0, 2.0]), - "High rate (z₁ > 0)": np.array([3.0, -2.0]), + "Low rate ($z_1 < 0$)": np.array([-3.0, 2.0]), + "High rate ($z_1 > 0$)": np.array([3.0, -2.0]), } fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(14, 5.5)) -tp_colors = ["steelblue", "firebrick"] -for (label, z), color in zip(z_states_tp.items(), tp_colors): +for label, z in z_states_tp.items(): tp = term_premiums(model_2f, z, n_max_tp) * 4 * 100 r_now = short_rate(model_2f, z) * 4 * 100 lam = risk_prices(model_2f, z) - ax1.plot(maturities_tp, tp, color=color, lw=2.2, + ax1.plot(maturities_tp, tp, lw=2.2, label=(f"{label}\n r={r_now:.1f}%," f" λ=[{lam[0]:.3f}, {lam[1]:.3f}]")) ax1.axhline(0, color="black", lw=0.8, ls="--") ax1.set_xlabel("Maturity (quarters)") ax1.set_ylabel("Term premium (% p.a.)") -ax1.set_title("Term Premiums — Two Regimes\n" - r"($\lambda_z < 0$: higher premiums when rates are low)") ax1.legend(fontsize=9) ax1.set_xlim(1, n_max_tp) @@ -606,21 +998,20 @@ A_bar_d, B_bar_d = bond_coefficients(model_2f, n_max_tp + 1) λ_t = risk_prices(model_2f, z_decomp) C_lam = model_2f.C @ λ_t -tp_level = np.array([-B_bar_d[n, 0] * C_lam[0] +tp_level = np.array([B_bar_d[n-1, 0] * C_lam[0] for n in range(1, n_max_tp + 1)]) * 4 * 100 -tp_slope = np.array([-B_bar_d[n, 1] * C_lam[1] +tp_slope = np.array([B_bar_d[n-1, 1] * C_lam[1] for n in range(1, n_max_tp + 1)]) * 4 * 100 tp_total = tp_level + tp_slope ax2.plot(maturities_tp, tp_total, 'k-', lw=2.2, label="Total") -ax2.plot(maturities_tp, tp_level, color="purple", lw=1.8, ls="--", +ax2.plot(maturities_tp, tp_level, lw=1.8, ls="--", label="Level factor") -ax2.plot(maturities_tp, tp_slope, color="orange", lw=1.8, ls="--", +ax2.plot(maturities_tp, tp_slope, lw=1.8, ls="--", label="Slope factor") ax2.axhline(0, color="black", lw=0.6, ls=":") ax2.set_xlabel("Maturity (quarters)") ax2.set_ylabel("Term premium (% p.a.)") -ax2.set_title("Factor Decomposition at z = [0, 0]") ax2.legend(fontsize=10) ax2.set_xlim(1, n_max_tp) @@ -635,74 +1026,116 @@ plt.tight_layout() plt.show() ``` +We see that the term premium is positive at all maturities in the low-rate state, but becomes negative at longer maturities in the high-rate state. + ## Risk-neutral probabilities -The stochastic discount factor {eq}`eq_sdf` defines a **change of measure** from the -physical measure $P$ to the **risk-neutral measure** $Q$. +We return to the VAR and short-rate equations +{eq}`eq_var`--{eq}`eq_shortrate`, which for convenience we repeat here: + +$$ +z_{t+1} = \mu + \phi z_t + C\varepsilon_{t+1}, \qquad +r_t = \delta_0 + \delta_1^\top z_t +$$ -Define the likelihood ratio +where $\varepsilon_{t+1} \sim \mathcal{N}(0, I)$. -```{math} -:label: eq_RN_ratio +We suppose that this structure describes the data-generating mechanism. -\frac{\xi^Q_{t+1}}{\xi^Q_t} = \exp\!\left(-\frac{1}{2}\lambda_t^\top\lambda_t - \lambda_t^\top\varepsilon_{t+1}\right) -``` +Finance economists call this the **physical measure** $P$, to distinguish it +from the **risk-neutral measure** $Q$ that we now describe. -Then +Under the physical measure, the conditional distribution of $z_{t+1}$ given +$z_t$ is $\mathcal{N}(\mu + \phi z_t,\; CC^\top)$. -$$ -m_{t+1} = \frac{\xi^Q_{t+1}}{\xi^Q_t}\exp(-r_t) -$$ +### Change of measure -and the pricing equation $\mathbb{E}^P_t(m_{t+1}R_{j,t+1}) = 1$ becomes +With the risk-price vector $\lambda_t = \lambda_0 + \lambda_z z_t$ from +{eq}`eq_riskprices`, define the non-negative random variable ```{math} -:label: eq_Qpricing +:label: eq_rn_ratio -\mathbb{E}^Q_t R_{j,t+1} = \exp(r_t) +\frac{\xi^Q_{t+1}}{\xi^Q_t} + = \exp\!\left(-\tfrac{1}{2}\lambda_t^\top\lambda_t + - \lambda_t^\top\varepsilon_{t+1}\right) ``` -*Under the risk-neutral measure, expected returns on all assets equal the risk-free return.* - -### The risk-neutral VAR +This is a log-normal random variable with mean 1, so it is a valid +likelihood ratio that can be used to twist the conditional distribution of +$z_{t+1}$. -Multiplying the physical conditional distribution of $z_{t+1}$ by the likelihood -ratio {eq}`eq_RN_ratio` gives the **risk-neutral conditional distribution** +Multiplying the physical conditional distribution by this likelihood ratio +transforms it into the **risk-neutral conditional distribution** $$ -z_{t+1} \mid z_t \;\overset{Q}{\sim}\; \mathcal{N}\!\bigl(\mu - C\lambda_0 + (\phi - C\lambda_z)z_t,\; CC^\top\bigr) +z_{t+1} \mid z_t \;\overset{Q}{\sim}\; + \mathcal{N}\!\bigl(\mu - C\lambda_0 + (\phi - C\lambda_z)z_t,\; CC^\top\bigr) $$ -In other words, under $Q$ the state vector follows +In other words, under $Q$ the state follows $$ -z_{t+1} = (\mu - C\lambda_0) + (\phi - C\lambda_z)\,z_t + C\varepsilon^Q_{t+1} +z_{t+1} = (\mu - C\lambda_0) + (\phi - C\lambda_z)\,z_t + + C\varepsilon^Q_{t+1} $$ where $\varepsilon^Q_{t+1} \sim \mathcal{N}(0, I)$ under $Q$. -The risk-neutral drift adjustments $-C\lambda_0$ (constant) and $-C\lambda_z$ (state-dependent) -encode exactly how the asset pricing formula $\mathbb{E}^P_t m_{t+1}R_{j,t+1}=1$ adjusts -expected returns for exposure to the risks $\varepsilon_{t+1}$. +The risk-neutral distribution twists the conditional mean from +$\mu + \phi z_t$ to $\mu - C\lambda_0 + (\phi - C\lambda_z)z_t$. + +The adjustments $-C\lambda_0$ (constant) and $-C\lambda_z$ +(state-dependent) encode how the pricing equation +$\mathbb{E}^P_t m_{t+1} R_{j,t+1} = 1$ adjusts expected returns for +exposure to the risks $\varepsilon_{t+1}$. + +### Asset pricing in a nutshell + +Let $\mathbb{E}^P$ denote an expectation under the physical measure that +nature uses to generate the data. + +Our key asset pricing equation is +$\mathbb{E}^P_t m_{t+1} R_{j,t+1} = 1$ for all returns $R_{j,t+1}$. + +Using {eq}`eq_rn_ratio`, we can express the SDF {eq}`eq_sdf` as + +$$ +m_{t+1} = \frac{\xi^Q_{t+1}}{\xi^Q_t}\,\exp(-r_t) +$$ + +Then the condition +$\mathbb{E}^P_t\bigl(\exp(-r_t)\, +\tfrac{\xi^Q_{t+1}}{\xi^Q_t}\, R_{j,t+1}\bigr) = 1$ +is equivalent to + +```{math} +:label: eq_qpricing + +\mathbb{E}^Q_t R_{j,t+1} = \exp(r_t) +``` + +*Under the risk-neutral measure, expected returns on all assets equal +the risk-free return.* ### Verification via risk-neutral pricing Bond prices can be computed by discounting at $r_t$ under $Q$: $$ -p_t(n) = \mathbb{E}^Q_t\! \left[\exp\!\left(-\sum_{s=0}^{n-1}r_{t+s}\right)\right] +p_t(n) = \mathbb{E}^Q_t \left[\exp \left(-\sum_{s=0}^{n-1}r_{t+s}\right)\right] $$ We can verify that this agrees with {eq}`eq_bondprice` by iterating the affine recursion under the risk-neutral VAR. -Below we confirm this numerically. +Below we confirm this numerically ```{code-cell} ipython3 def bond_price_mc_Q(model, z0, n, n_sims=50_000, rng=None): """Estimate p_t(n) by Monte Carlo under Q.""" if rng is None: - rng = np.random.default_rng(2024) + rng = np.random.default_rng(0) m = len(z0) Z = np.tile(z0, (n_sims, 1)) disc = np.zeros(n_sims) @@ -715,9 +1148,9 @@ def bond_price_mc_Q(model, z0, n, n_sims=50_000, rng=None): z_test = np.array([0.01, 0.005]) p_analytic = bond_prices(model_2f, z_test, 40) -rng = np.random.default_rng(2024) +rng = np.random.default_rng(0) maturities_check = [4, 12, 24, 40] -mc_prices = [bond_price_mc_Q(model_2f, z_test, n, n_sims=80_000, rng=rng) +mc_prices = [bond_price_mc_Q(model_2f, z_test, n, n_sims=100_000, rng=rng) for n in maturities_check] header = (f"{'Maturity':>10} {'Analytic':>12}" @@ -731,76 +1164,144 @@ for n, mc in zip(maturities_check, mc_prices): ``` The analytical and Monte Carlo bond prices agree closely, validating the -Riccati recursion {eq}`eq_riccati_A`–{eq}`eq_riccati_B`. +Riccati recursion {eq}`eq_riccati_a`–{eq}`eq_riccati_b`. ## Distorted beliefs -{cite:t}`piazzesi2015trend` assemble survey -evidence suggesting that economic experts' forecasts are *systematically biased* -relative to the physical measure. +{cite:t}`piazzesi2015trend` assemble survey evidence suggesting that economic +experts' forecasts are systematically biased relative to the physical measure. ### The subjective measure -Let $\hat z_{t+1}$ be one-period-ahead expert forecasts. +Let $\{z_t\}_{t=1}^T$ be a record of observations on the state and let +$\{\check z_{t+1}\}_{t=1}^T$ be a record of one-period-ahead expert forecasts. -Regressing these on $z_t$: +Let $\check\mu, \check\phi$ be the regression coefficients in $$ -\hat z_{t+1} = \hat\mu + \hat\phi\, z_t + e_{t+1} +\check z_{t+1} = \check\mu + \check\phi\, z_t + e_{t+1} $$ -yields estimates $\hat\mu, \hat\phi$ that differ from the physical parameters $\mu, \phi$. +where the residual $e_{t+1}$ has mean zero, is orthogonal to $z_t$, and +satisfies $\mathbb{E}\,e_{t+1} e_{t+1}^\top = CC^\top$. -To formalise the distortion, let $\kappa_t = \kappa_0 + \kappa_z z_t$ and define +By comparing estimates of $\mu, \phi$ from {eq}`eq_var` with estimates of +$\check\mu, \check\phi$ from the experts' forecasts, {cite:t}`piazzesi2015trend` +deduce that the experts' beliefs are systematically distorted. + +To organize this evidence, let $\kappa_t = \kappa_0 + \kappa_z z_t$ and define the likelihood ratio ```{math} -:label: eq_Srat +:label: eq_srat \frac{\xi^S_{t+1}}{\xi^S_t} -= \exp\!\left(-\frac{1}{2}\kappa_t^\top\kappa_t - \kappa_t^\top\varepsilon_{t+1}\right) + = \exp\!\left(-\tfrac{1}{2}\kappa_t^\top\kappa_t + - \kappa_t^\top\varepsilon_{t+1}\right) ``` -Multiplying the physical conditional distribution of $z_{t+1}$ by this likelihood -ratio gives the **subjective (S) conditional distribution** +This is log-normal with mean 1, so it is a valid likelihood ratio. + +Multiplying the physical conditional distribution of $z_{t+1}$ by this +likelihood ratio transforms it to the experts' **subjective conditional +distribution** $$ z_{t+1} \mid z_t \;\overset{S}{\sim}\; -\mathcal{N}\!\bigl(\mu - C\kappa_0 + (\phi - C\kappa_z)\,z_t,\; CC^\top\bigr) + \mathcal{N}\!\bigl(\mu - C\kappa_0 + (\phi - C\kappa_z)\,z_t,\; CC^\top\bigr) $$ -Comparing with the regression implies +In the experts' forecast regression, $\check\mu$ estimates +$\mu - C\kappa_0$ and $\check\phi$ estimates $\phi - C\kappa_z$. + +{cite:t}`piazzesi2015trend` find that the experts behave as if the level and +slope of the yield curve are more persistent than under the physical measure: +$\check\phi$ has larger eigenvalues than $\phi$. + +### Pricing under distorted beliefs + +{cite:t}`piazzesi2015trend` explore the hypothesis that a representative +agent with these distorted beliefs prices assets and makes returns satisfy $$ -\hat\mu = \mu - C\kappa_0, \qquad \hat\phi = \phi - C\kappa_z +\mathbb{E}^S_t\bigl(m^\star_{t+1}\, R_{j,t+1}\bigr) = 1 $$ -Piazzesi et al. find that experts behave as if the level and slope of the yield -curve are *more persistent* than under the physical measure: $\hat\phi$ has -larger eigenvalues than $\phi$. +where $\mathbb{E}^S_t$ is the conditional expectation under the subjective +$S$ measure and $m^\star_{t+1}$ is the SDF of an agent with these beliefs. -### Pricing under distorted beliefs +In particular, the agent's SDF is -A representative agent with subjective beliefs $S$ and risk prices $\lambda^\star_t$ -satisfies +$$ +m^\star_{t+1} = \exp\!\left(-r^\star_t + - \tfrac{1}{2}\lambda_t^{\star\top}\lambda^\star_t + - \lambda_t^{\star\top}\varepsilon_{t+1}\right) +$$ + +where $r^\star_t$ is the short rate and $\lambda^\star_t$ is the agent's +vector of risk prices. + +Using {eq}`eq_srat` to convert to the physical measure, the subjective +pricing equation becomes + +$$ +\mathbb{E}^P_t\!\left[ + \exp\!\left(-r^\star_t + - \tfrac{1}{2}\lambda_t^{\star\top}\lambda^\star_t + - \lambda_t^{\star\top}\varepsilon_{t+1} + \right) + \exp\!\left( + - \tfrac{1}{2}\kappa_t^\top\kappa_t + - \kappa_t^\top\varepsilon_{t+1} + \right) + R_{j,t+1} +\right] = 1 +$$ + +Combining the two exponentials gives $$ -\mathbb{E}^S_t\bigl(m^\star_{t+1} R_{j,t+1}\bigr) = 1 +\mathbb{E}^P_t\!\left[ + \exp\!\left(-r_t + - \tfrac{1}{2}(\lambda^\star_t + \kappa_t)^\top(\lambda^\star_t + \kappa_t) + - (\lambda^\star_t + \kappa_t)^\top\varepsilon_{t+1} + \right) R_{j,t+1} +\right] = 1 $$ -Expanding this in terms of the physical measure $P$, one finds that the -**rational-expectations econometrician** who imposes $P$ will estimate risk prices +where $r_t = r^\star_t - \lambda_t^{\star\top}\kappa_t$. + +Comparing this with the rational-expectations econometrician's pricing +equation $$ -\hat\lambda_t = \lambda^\star_t + \kappa_t +\mathbb{E}^P_t\!\left[ + \exp\!\left(-r_t + - \tfrac{1}{2}\lambda_t^\top\lambda_t + - \lambda_t^\top\varepsilon_{t+1} + \right) R_{j,t+1} +\right] = 1 $$ -That is, the econometrician's estimate conflates true risk prices $\lambda^\star_t$ -and belief distortions $\kappa_t$. +we see that what the econometrician interprets as $\lambda_t$ is actually +$\lambda^\star_t + \kappa_t$. + +Because the econometrician's estimates partly reflect systematic +distortions in subjective beliefs, they can overstate the representative +agent's true risk prices $\lambda^\star_t$ in this calibration. + +Below we construct a numerical example to illustrate this point. -Part of what looks like a high price of risk is actually a systematic forecast bias. +We keep the same physical state dynamics and short-rate specification as above, but choose a separate true risk-price process $(\lambda_t^\star)$ and a distorted-belief econometrician process $(\hat\lambda_t)$ to illustrate the decomposition. -### Numerical illustration +We then set the subjective parameters $\check\mu, \check\phi$ to match the evidence in +{cite:t}`piazzesi2015trend` that experts behave as if the level and slope of the yield curve are more persistent than under the physical measure. + +In particular, we use + +$$ +\check\phi = \begin{pmatrix} 0.985 & -0.025 \\ 0.00 & 0.94 \end{pmatrix} +$$ ```{code-cell} ipython3 φ_P = φ_2.copy() @@ -808,47 +1309,30 @@ Part of what looks like a high price of risk is actually a systematic forecast b # Subjective parameters: experts believe factors are MORE persistent φ_S = np.array([[0.985, -0.025], [0.00, 0.94]]) -μ_S = np.array([-0.005, 0.0]) +μ_S = np.array([0.005, 0.0]) κ_z = np.linalg.solve(C_2, φ_P - φ_S) κ_0 = np.linalg.solve(C_2, μ_P - μ_S) -print("Distortion parameters" - " (κ quantifies how experts' beliefs" - " differ from P):") -print(f" κ_0 = {κ_0.round(4)}") -print(f" κ_z =\n{κ_z.round(4)}") -print() -print("Eigenvalue comparison:") -eig_P = sorted(eigvals(φ_P).real, reverse=True) -eig_S = sorted(eigvals(φ_S).real, reverse=True) -print(f" Physical φ eigenvalues: {[round(e, 4) for e in eig_P]}") -print(f" Subjective φ̂ eigenvalues: {[round(e, 4) for e in eig_S]}") -print(" Experts believe both factors are more persistent.") -print() - -λ_star_0 = np.array([0.03, 0.015]) +λ_star_0 = np.array([-0.03, -0.015]) λ_star_z = np.array([[-0.006, 0.0], [0.0, -0.004]]) λ_hat_0 = λ_star_0 + κ_0 λ_hat_z = λ_star_z + κ_z - -print("True risk prices: λ*_0 =", λ_star_0.round(4)) -print("Econometrician estimates: λ̂_0 =", λ_hat_0.round(4)) -print(f" Belief distortion inflates λ̂_0 by κ_0 = {κ_0.round(4)}.") ``` ```{code-cell} ipython3 +--- +mystnb: + figure: + caption: True vs. distorted-belief term premiums and overstatement ratio + name: fig-distorted-beliefs +--- model_true = create_affine_model( μ_2, φ_2, C_2, δ_0_2, δ_1_2, λ_star_0, λ_star_z) model_econ = create_affine_model( μ_2, φ_2, C_2, δ_0_2, δ_1_2, λ_hat_0, λ_hat_z) -for name, mdl in [("True", model_true), ("Econometrician", model_econ)]: - eigs = eigvals(mdl.φ_rn).real - status = "stable" if all(abs(e) < 1 for e in eigs) else "UNSTABLE" - print(f"{name} model: φ^Q eigenvalues = {eigs.round(4)} ({status})") - z_ref = np.array([0.0, 0.0]) n_max_db = 60 maturities_db = np.arange(1, n_max_db + 1) @@ -858,18 +1342,17 @@ tp_econ = term_premiums(model_econ, z_ref, n_max_db) * 4 * 100 fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(14, 5.5)) -ax1.plot(maturities_db, tp_true, lw=2.2, color="steelblue", +ax1.plot(maturities_db, tp_true, lw=2.2, label=r"True risk prices $\lambda^\star_t$") -ax1.plot(maturities_db, tp_econ, lw=2.2, color="firebrick", ls="--", +line_econ, = ax1.plot(maturities_db, tp_econ, lw=2.2, ls="--", label=(r"RE econometrician" r" $\hat\lambda_t = \lambda^\star_t + \kappa_t$")) ax1.fill_between(maturities_db, tp_true, tp_econ, - alpha=0.15, color="firebrick", + alpha=0.15, color=line_econ.get_color(), label="Belief distortion component") ax1.axhline(0, color="black", lw=0.8, ls=":") ax1.set_xlabel("Maturity (quarters)") ax1.set_ylabel("Term premium (% p.a.)") -ax1.set_title("True vs. Distorted-Belief Term Premiums") ax1.legend(fontsize=9.5) ax1.set_xlim(1, n_max_db) @@ -877,12 +1360,11 @@ mask = np.abs(tp_true) > 1e-8 ratio = np.full_like(tp_true, np.nan) ratio[mask] = tp_econ[mask] / tp_true[mask] -ax2.plot(maturities_db[mask], ratio[mask], lw=2.2, color="darkred") +ax2.plot(maturities_db[mask], ratio[mask], lw=2.2) ax2.axhline(1, color="black", lw=0.8, ls="--", label="No distortion (ratio = 1)") ax2.set_xlabel("Maturity (quarters)") ax2.set_ylabel(r"$\hat{tp}\, /\, tp^\star$") -ax2.set_title("Overstatement Ratio from Ignoring Belief Bias") ax2.legend(fontsize=11) ax2.set_xlim(1, n_max_db) @@ -897,45 +1379,17 @@ plt.tight_layout() plt.show() ``` -When expert beliefs are overly persistent ($\hat\phi$ has larger eigenvalues than -$\phi$), the rational-expectations econometrician attributes too much of the -observed risk premium to risk aversion. +When expert beliefs are overly persistent ($\check\phi$ has larger eigenvalues +than $\phi$), the rational-expectations econometrician attributes too much of +the observed risk premium to risk aversion. Disentangling belief distortions from genuine risk prices requires additional -data — for example, the survey forecasts used by Piazzesi, Salomao, and Schneider. +data, for example, the survey forecasts used by +{cite:t}`piazzesi2015trend`. Our {doc}`Risk Aversion or Mistaken Beliefs? ` lecture explores this confounding in greater depth. -## The bond price recursion - -We verify the exponential affine form {eq}`eq_bondprice` by induction. - -**Claim:** If $p_{t+1}(n) = \exp(\bar A_n + \bar B_n^\top z_{t+1})$, then -$p_t(n+1) = \exp(\bar A_{n+1} + \bar B_{n+1}^\top z_t)$ with $\bar A_{n+1}$ and -$\bar B_{n+1}$ given by {eq}`eq_riccati_A`–{eq}`eq_riccati_B`. - -**Proof sketch.** Using the SDF {eq}`eq_sdf` and the VAR {eq}`eq_var`: - -$$ -\log m_{t+1} + \log p_{t+1}(n) -= -r_t - \tfrac{1}{2}\lambda_t^\top\lambda_t - + (\bar A_n + \bar B_n^\top\mu + \bar B_n^\top\phi z_t) - + (-\lambda_t + C^\top\bar B_n)^\top\varepsilon_{t+1} -$$ - -Taking the conditional expectation (and using $\varepsilon_{t+1}\sim\mathcal{N}(0,I)$): - -$$ -\log p_t(n+1) = -r_t - \tfrac{1}{2}\lambda_t^\top\lambda_t - + \bar A_n + \bar B_n^\top(\mu + \phi z_t) - + \tfrac{1}{2}(\lambda_t - C^\top\bar B_n)^\top(\lambda_t - C^\top\bar B_n) -$$ - -Substituting $r_t = \delta_0 + \delta_1^\top z_t$ and $\lambda_t = \lambda_0 + \lambda_z z_t$, -collecting constant and linear-in-$z_t$ terms, and equating coefficients gives -exactly {eq}`eq_riccati_A`–{eq}`eq_riccati_B`. $\blacksquare$ - ## Concluding remarks The affine model of the stochastic discount factor provides a flexible and tractable @@ -943,14 +1397,14 @@ framework for studying asset prices. Key features are: -1. **Analytical tractability** — Bond prices are exponential affine in $z_t$; +1. **Analytical tractability:** Bond prices are exponential affine in $z_t$; expected returns decompose cleanly into a short rate plus a risk-price×exposure inner product. -2. **Empirical flexibility** — The free parameters $(\mu, \phi, C, \delta_0, \delta_1, \lambda_0, \lambda_z)$ +2. **Empirical flexibility:** The free parameters $(\mu, \phi, C, \delta_0, \delta_1, \lambda_0, \lambda_z)$ can be estimated by maximum likelihood (the {doc}`Kalman filter ` chapter describes the relevant methods) without imposing restrictions from a full general equilibrium model. -3. **Multiple risks** — The vector structure accommodates many sources of risk (monetary +3. **Multiple risks:** The vector structure accommodates many sources of risk (monetary policy, real activity, volatility, etc.). -4. **Belief distortions** — The framework naturally accommodates non-rational beliefs via +4. **Belief distortions:** The framework naturally accommodates non-rational beliefs via likelihood-ratio twists of the physical measure, as in {cite:t}`piazzesi2015trend`. diff --git a/lectures/likelihood_ratio_process.md b/lectures/likelihood_ratio_process.md index 26c315dbb..687f16f14 100644 --- a/lectures/likelihood_ratio_process.md +++ b/lectures/likelihood_ratio_process.md @@ -1322,7 +1322,7 @@ plt.show() Evidently, $e^{-C(f,g)T}$ is an upper bound on the error rate. -In `{doc}`divergence_measures`, we also studied **Jensen-Shannon divergence** as +In {doc}`divergence_measures`, we also studied **Jensen-Shannon divergence** as a symmetric measure of distance between distributions. We can use Jensen-Shannon divergence to measure the distance between distributions $f$ and $g$ and diff --git a/lectures/risk_aversion_or_mistaken_beliefs.md b/lectures/risk_aversion_or_mistaken_beliefs.md index e9c93f832..2bf92343b 100644 --- a/lectures/risk_aversion_or_mistaken_beliefs.md +++ b/lectures/risk_aversion_or_mistaken_beliefs.md @@ -22,33 +22,51 @@ kernelspec: ## Overview -This lecture explores how *risk aversion* and *mistaken beliefs* are -confounded in asset pricing data. +This lecture explores how *risk aversion* and *mistaken beliefs* are confounded in asset pricing data. In a rational expectations equilibrium containing a risk-averse representative investor, higher mean returns compensate for higher risks. But in a non-rational expectations model in which a representative investor holds beliefs that differ from "the econometrician's", observed average returns depend on *both* risk aversion *and* misunderstood return distributions. +```{note} +Whether beliefs are 'correct' or 'wrong' is itself subjective -- it depends on an observer's point of view. +``` + Wrong beliefs contribute what look like "stochastic discount factor shocks" when viewed from the perspective of an econometrician who trusts his model. -Those different perspectives can potentially explain observed countercyclical risk prices. +Such divergent beliefs can potentially explain what look like countercyclical risk price from the perpective of someone who trusts the +econometrician's model. + +A key building block of this model will be an econometrician's model that takes the form of a linear state-space model driven by Gaussian disturbances. + +This model will play two key roles: + +* it forms the perspective from which 'mistaken' beliefs and their consequences are viewed +* it forms the 'baseline' model of a dubious representative agent who distrusts it and wants to value assets payoffs by using alternative models that +seem to fit the historical data about as well as does the 'baseline' model. + +```{note} +When we discuss the setup with a twisted entry ball below, the econometrician's model will be one of *two* baseline models that the distrustful agent is concerned about. +``` -We organize a discussion of these ideas around a single mathematical device, namely, a **likelihood ratio**, -a non-negative random variable with unit mean that twists one probability -distribution into another. +We'll formalize different beliefs in terms of divergent probability distributions. -Likelihood ratios — equivalently, multiplicative martingale increments — appear -in at least four distinct roles in modern asset pricing: +It is convenient to characterize those differences in terms of a likelihood ratio process, the object studied in this quantecon lecture +{doc}`likelihood_ratio_process`. + +Thus, we'll organize this lecture around a single mathematical device, namely, a **likelihood ratio**, a non-negative random variable with unit mean that twists one probability distribution into another. + +Likelihood ratios, equivalently multiplicative martingale increments, appear in at least four distinct roles in modern asset pricing: | Probability | Likelihood ratio | Describes | |:--------------|:----------------------------------|:----------------------| -| Econometric | $1$ | macro risk factors | +| Econometric | $1$ (no twist) | macro risk factors | | Risk neutral | $m_{t+1}^\lambda$ | prices of risks | | Mistaken | $m_{t+1}^w$ | experts' forecasts | | Doubtful | $m_{t+1} \in \mathcal{M}$ | misspecification fears| -Each likelihood ratio takes the log-normal form -$m_{t+1}^b = \exp(-b_t' \varepsilon_{t+1} - \frac{1}{2} b_t' b_t)$ +Each of the key likelihood ratios in this lecture takes the log-normal form +$m_{t+1}^b = \exp(-b_t^\top \varepsilon_{t+1} - \frac{1}{2} b_t^\top b_t)$ with $b_t = 0$, $\lambda_t$, $w_t$, or a worst-case distortion. The lecture draws primarily on three lines of work: @@ -67,74 +85,107 @@ We start with some standard imports: ```{code-cell} ipython3 import numpy as np import matplotlib.pyplot as plt +import pandas as pd from scipy.linalg import solve_discrete_lyapunov -from numpy.linalg import inv, eigvals, norm +from numpy.linalg import eigvals, norm +from scipy.stats import norm as normal_dist ``` ## Likelihood ratios and twisted densities -### The baseline model Let $\varepsilon$ denote a vector of risks to be taken and priced. -Under the -econometrician's probability model, $\varepsilon$ has a standard multivariate -normal density: +Under the econometrician's probability model, $\varepsilon$ has a standard multivariate normal density: ```{math} :label: eq_baseline -\phi(\varepsilon) \propto \exp\!\left(-\frac{1}{2}\,\varepsilon'\varepsilon\right), \qquad \varepsilon \sim \mathcal{N}(0, I) +\phi(\varepsilon) \propto \exp \left(-\frac{1}{2} \varepsilon^\top\varepsilon\right), \qquad \varepsilon \sim \mathcal{N}(0, I) ``` -### The likelihood ratio - -Define a **likelihood ratio** +To twist this baseline density into another one, we multiply it by a non-negative random variable with unit mean called a **likelihood ratio**: ```{math} :label: eq_lr -m(\varepsilon) = \exp\!\left(-\lambda'\varepsilon - \frac{1}{2}\,\lambda'\lambda\right) \geq 0 +m(\varepsilon) = \exp \left(-\lambda^\top\varepsilon - \frac{1}{2} \lambda^\top\lambda\right) \geq 0 ``` -which satisfies $E\, m(\varepsilon) = 1$ when the mathematical expectation $E$ is taken with respect to the econometrician's model. - -### The twisted density +The quadratic term $-\frac{1}{2}\lambda^\top\lambda$ in the exponent is precisely what guarantees $E m(\varepsilon) = 1$ when the mathematical expectation $E$ is taken with respect to the econometrician's model. -The **twisted density** is +Multiplying the baseline density by this likelihood ratio produces the **twisted density**: ```{math} :label: eq_twisted -\hat\phi(\varepsilon) = m(\varepsilon)\,\phi(\varepsilon) \propto \exp\!\left(-\frac{1}{2}(\varepsilon + \lambda)'(\varepsilon + \lambda)\right) +\hat\phi(\varepsilon) = m(\varepsilon) \phi(\varepsilon) \propto \exp \left(-\frac{1}{2}(\varepsilon + \lambda)^\top(\varepsilon + \lambda)\right) ``` -which is a $\mathcal{N}(-\lambda, I)$ density. +Completing the square in the exponent reveals that this is a $\mathcal{N}(-\lambda, I)$ density. The likelihood ratio has shifted the mean of $\varepsilon$ from $0$ to $-\lambda$ while preserving the covariance. +We will see this idea repeatedly in different contexts. + +````{exercise} +:label: lr_exercise_1 + +Verify that: + +1. $E m(\varepsilon) = 1$ by computing $\int m(\varepsilon) \phi(\varepsilon) d\varepsilon$ using the moment-generating function of a standard normal. +2. The twisted density $\hat\phi(\varepsilon) = m(\varepsilon) \phi(\varepsilon)$ is indeed $\mathcal{N}(-\lambda, I)$ by combining exponents: + +$$ +m(\varepsilon) \phi(\varepsilon) \propto \exp \left(-\lambda^\top\varepsilon - \tfrac{1}{2}\lambda^\top\lambda\right) \exp \left(-\tfrac{1}{2}\varepsilon^\top\varepsilon\right) = \exp \left(-\tfrac{1}{2}\bigl[\varepsilon^\top\varepsilon + 2\lambda^\top\varepsilon + \lambda^\top\lambda\bigr]\right) +$$ + +and complete the square to obtain $-\frac{1}{2}(\varepsilon + \lambda)^\top(\varepsilon + \lambda)$. + +```` + +````{solution} lr_exercise_1 +:class: dropdown + +For part 1, write $E m(\varepsilon) = \int \exp(-\lambda^\top\varepsilon - \tfrac{1}{2}\lambda^\top\lambda) \phi(\varepsilon) d\varepsilon = \exp(-\tfrac{1}{2}\lambda^\top\lambda) E[\exp(-\lambda^\top\varepsilon)]$. + +The moment-generating function of $\varepsilon \sim \mathcal{N}(0,I)$ (or expectation of the log-normal random variable) gives $E[\exp(-\lambda^\top\varepsilon)] = \exp(\tfrac{1}{2}\lambda^\top\lambda)$. + +So $E m(\varepsilon) = \exp(-\tfrac{1}{2}\lambda^\top\lambda)\exp(\tfrac{1}{2}\lambda^\top\lambda) = 1$. + +For part 2, combine the exponents: + +$$ +m(\varepsilon) \phi(\varepsilon) \propto \exp \left(-\tfrac{1}{2}\varepsilon^\top\varepsilon - \lambda^\top\varepsilon - \tfrac{1}{2}\lambda^\top\lambda\right) +$$ + +Recognise the argument as $-\tfrac{1}{2}(\varepsilon^\top\varepsilon + 2\lambda^\top\varepsilon + \lambda^\top\lambda) = -\tfrac{1}{2}(\varepsilon + \lambda)^\top(\varepsilon + \lambda)$. + +This is the kernel of a $\mathcal{N}(-\lambda, I)$ density. + +```` + ### Relative entropy -The **relative entropy** (Kullback–Leibler divergence) of the twisted density -with respect to the baseline density is +How far apart are the baseline and twisted densities? + +The **relative entropy** (Kullback-Leibler divergence) answers this question with a single number: ```{math} :label: eq_entropy -E\bigl[m(\varepsilon)\log m(\varepsilon)\bigr] = \frac{1}{2}\,\lambda'\lambda +E\bigl[m(\varepsilon)\log m(\varepsilon)\bigr] = \frac{1}{2} \lambda^\top\lambda ``` -a convenient scalar measure of the statistical distance between the two models. +Because it equals half the squared length of $\lambda$, larger distortion vectors correspond to greater statistical distance between the two models. The vector $\lambda$ is the key object. Depending on context it represents *risk prices*, *belief distortions*, or *worst-case mean perturbations* under model uncertainty. -### Visualising the twist +For illustration, consider the scalar case $\varepsilon \in \mathbb{R}$ with $\lambda = 1.5$. ```{code-cell} ipython3 -from scipy.stats import norm as normal_dist - ε = np.linspace(-5, 5, 500) λ_val = 1.5 @@ -145,26 +196,22 @@ m_lr = np.exp(-λ_val * ε - 0.5 * λ_val**2) fig, axes = plt.subplots(1, 3, figsize=(14, 4)) axes[0].plot(ε, ϕ_base, 'steelblue', lw=2) -axes[0].set_title(r"Baseline $\phi(\varepsilon)$: $\mathcal{N}(0,1)$") axes[0].set_xlabel(r"$\varepsilon$") axes[1].plot(ε, m_lr, 'firebrick', lw=2) axes[1].axhline(1, color='grey', lw=0.8, ls='--') -axes[1].set_title(rf"Likelihood ratio $m(\varepsilon)$, $\lambda={λ_val}$") axes[1].set_xlabel(r"$\varepsilon$") -axes[2].plot(ε, ϕ_base, 'steelblue', lw=1.5, +axes[2].plot(ε, ϕ_base, 'steelblue', lw=2, ls='--', alpha=0.6, label='Baseline') axes[2].plot(ε, ϕ_twist, 'firebrick', lw=2, label='Twisted') -axes[2].set_title( - r"Twisted $\hat\phi(\varepsilon)$:" - r" $\mathcal{N}(-\lambda, 1)$") axes[2].set_xlabel(r"$\varepsilon$") axes[2].legend() -for ax in axes: - ax.set_ylabel("Density") +axes[0].set_ylabel("Density") +axes[1].set_ylabel("Likelihood ratio") +axes[2].set_ylabel("Density") plt.tight_layout() plt.show() ``` @@ -178,31 +225,55 @@ The right panel shows the resulting twisted density $\hat\phi(\varepsilon) = \ma ## The econometrician's state-space model -### State dynamics +The econometrician works with a linear Gaussian state-space system at a *monthly* frequency. -The econometrician works with a linear Gaussian state-space system: +The state $x_t$, an augmented $n \times 1$ vector, evolves according to: ```{math} :label: eq_state -x_{t+1} = A\,x_t + C\,\varepsilon_{t+1} +x_{t+1} = A x_t + C \varepsilon_{t+1} ``` +The econometrician observes $y_{t+1}$, which is a noisy linear function of the state and the same shocks: + ```{math} :label: eq_obs -y_{t+1} = D\,x_t + G\,\varepsilon_{t+1} +y_{t+1} = D x_t + G \varepsilon_{t+1} ``` +The $k \times 1$ shock vector driving both equations is i.i.d. standard normal: + ```{math} :label: eq_shocks \varepsilon_{t+1} \sim \mathcal{N}(0, I) ``` -where $y_{t+1}$ collects utility-relevant variables (e.g., consumption growth), -$r_t = \bar{r}\,x_t$ is the risk-free one-period interest rate, and -$d_t = \bar{d}\,x_t$ is the payout process from an asset. +To accommodate constant terms easily, we assume that the first entry in the state vector is a constant $1$ so that + +$$ +x_t = \begin{bmatrix} 1 \\ \check{x}_t \end{bmatrix}, \qquad +A = \begin{bmatrix} 1 & 0 \\ 0 & \check{A} \end{bmatrix}, \qquad +C = \begin{bmatrix} 0 \\ \check{C} \end{bmatrix} +$$ + +where $\check{A}$ is a stable matrix, $\check{C}$ is square and invertible, and the first component of $x_0$ is $1$. + +With this convention, the number of shocks equals the dimension of the stochastic block: $k = n - 1$. + +Whenever we back out distortion coefficient matrices from alternative transition matrices, we invert only the lower block $\check{C}$ and compare the lower rows of the augmented transition matrices, not the full augmented matrix $C$. + +Whenever we refer to stability below, we mean stability of the stochastic block $\check{A}$ (or its distorted counterpart). + +The observation $y_{t+1}$ represents consumption growth, $c_{t+1} - c_t = D x_t + G \varepsilon_{t+1}$. + +Separately, the risk-free one-period interest rate is a linear function of the augmented state: + +$$ +r_t = \bar{r}^\top x_t +$$ ```{figure} /_static/lecture_specific/risk_aversion_or_mistaken_beliefs/fig2_tom.png The econometrician's model: estimated state dynamics. @@ -213,123 +284,142 @@ The econometrician's model: estimated state dynamics. ### Risk-neutral rational expectations pricing -Under rational expectations with a risk-neutral representative investor, -stock prices satisfy: +The simplest benchmark is a risk-neutral representative investor with rational expectations, for whom the stock price $p_t$ (the ex-dividend market value of a claim to the stream $\{d_{t+j}\}_{j=1}^\infty$) is simply the discounted expected payoff: $$ -p_t = \exp(-r_t)\,E_t(p_{t+1} + d_{t+1}) +p_t = \exp(-r_t) E_t(p_{t+1} + d_{t+1}) $$ -The expectations theory of the term structure of interest rates prices a -zero-coupon risk-free claim to one dollar at time $t+n$ as: +The same logic applies maturity by maturity to the term structure: a zero-coupon risk-free claim to one dollar at time $t+n$ is priced by iterating the one-period discounting: ```{math} :label: eq_rn_recursion -p_t(1) = \exp(-r_t), \qquad p_t(n+1) = \exp(-r_t)\,E_t\,p_{t+1}(n), \qquad p_t(n) = \exp(B_n\,x_t) +p_t(1) = \exp(-r_t), \qquad p_t(n+1) = \exp(-r_t) E_t p_{t+1}(n), \qquad p_t(n) = \exp(\bar{A}_n^{RN} + B_n^{RN} x_t) ``` -These formulas work "pretty well" for conditional means but less well for -conditional variances — the Shiller *volatility puzzles*. +The last equality states that bond prices take an **exponential-affine** form in the state. + +This is a consequence of the linear Gaussian structure and can be verified by substituting the guess into the recursion and matching coefficients (see {ref}`Exercise 3 ` in {doc}`Affine Models of Asset Prices `). + +These formulas work "pretty well" for conditional means but less well for conditional variances, i.e. the Shiller *volatility puzzles*. ### Modern asset pricing: adding risk aversion -Let the likelihood ratio increment be +It would be convenient if versions of the same pricing formulas worked even when investors are risk averse or hold distorted beliefs. + +The likelihood ratio makes this possible. + +We now promote the static vector $\lambda$ from {eq}`eq_lr` to a *state-dependent* risk price vector. + +With a slight abuse of notation, we now let $\lambda$ denote a $k \times n$ **matrix** of risk price coefficients, so that $\lambda_t = \lambda x_t$ is a $k \times 1$ vector at each date $t$. + +In the code below, this matrix is the parameter `Λ`. + +The likelihood ratio increment is ```{math} :label: eq_sdf_lr -m_{t+1}^\lambda = \exp\!\left(-\lambda_t'\,\varepsilon_{t+1} - \frac{1}{2}\,\lambda_t'\lambda_t\right), \qquad \lambda_t = \lambda\,x_t +m_{t+1}^\lambda = \exp \left(-\lambda_t^\top \varepsilon_{t+1} - \frac{1}{2} \lambda_t^\top\lambda_t\right), \qquad \lambda_t = \lambda x_t ``` -with $E_t\,m_{t+1}^\lambda = 1$ and $m_{t+1}^\lambda \geq 0$. +with $E_t m_{t+1}^\lambda = 1$ and $m_{t+1}^\lambda \geq 0$. + +The likelihood ratio $m_{t+1}^\lambda$ distorts the conditional distribution of $\varepsilon_{t+1}$ from $\mathcal{N}(0,I)$ to $\mathcal{N}(-\lambda x_t, I)$. -The likelihood ratio $m_{t+1}^\lambda$ distorts the conditional distribution -of $\varepsilon_{t+1}$ from $\mathcal{N}(0,I)$ to $\mathcal{N}(-\lambda\,x_t, I)$. +Covariances of returns with $m_{t+1}^\lambda$ affect mean returns. -Covariances of returns with $m_{t+1}^\lambda$ affect mean returns — this is the -channel through which risk aversion prices risks. +This is the channel through which risk aversion prices risks. -With this device, *modern asset pricing* takes the form: +With this device, *modern asset pricing* replaces the ordinary conditional expectation with one that is tilted by the likelihood ratio. -For stocks (Lucas–Hansen): +For stocks, the Lucas-Hansen pricing equation discounts the next-period payoff under the distorted measure: ```{math} :label: eq_stock_lr -p_t = \exp(-r_t)\,E_t\bigl(m_{t+1}^\lambda\,(p_{t+1} + d_{t+1})\bigr) +p_t = \exp(-r_t) E_t\bigl(m_{t+1}^\lambda (p_{t+1} + d_{t+1})\bigr) ``` -For the term structure (Dai–Singleton–Backus–Zin): +For the term structure, Dai-Singleton-Backus-Zin pricing applies the same distortion recursively across maturities: ```{math} :label: eq_ts_lr -p_t(1) = \exp(-r_t), \qquad p_t(n+1) = \exp(-r_t)\,E_t\bigl(m_{t+1}^\lambda\,p_{t+1}(n)\bigr), \qquad p_t(n) = \exp(B_n\,x_t) +p_t(1) = \exp(-r_t), \qquad p_t(n+1) = \exp(-r_t) E_t\bigl(m_{t+1}^\lambda p_{t+1}(n)\bigr), \qquad p_t(n) = \exp(\bar{A}_n + B_n x_t) ``` +The coefficients $\bar{A}_n$, $B_n$ here differ from the risk-neutral coefficients $\bar{A}_n^{RN}$, $B_n^{RN}$ in {eq}`eq_rn_recursion` because the likelihood ratio modifies the recursion. + ### Risk-neutral dynamics -The risk-neutral representation implies **twisted dynamics**: +The risk-neutral representation implies **twisted dynamics**. + +Under the twisted measure, define $\tilde\varepsilon_{t+1} := \varepsilon_{t+1} + \lambda_t = \varepsilon_{t+1} + \lambda x_t$. + +Since $\varepsilon_{t+1} \sim \mathcal{N}(0, I)$ under the econometrician's measure, $\tilde\varepsilon_{t+1}$ has mean $\lambda x_t$ and is *not* standard normal under that measure. + +However, the likelihood ratio $m_{t+1}^\lambda \propto \exp\bigl(-(\lambda x_t)^\top \varepsilon_{t+1} - \tfrac{1}{2}\|\lambda x_t\|^2\bigr)$ tilts the probability measure in exactly the right way to absorb this shift. + +By the standard exponential tilting result for Gaussian models, $\tilde\varepsilon_{t+1} \sim \mathcal{N}(0, I)$ under the risk-neutral measure. + +Substituting $\varepsilon_{t+1} = \tilde\varepsilon_{t+1} - \lambda x_t$ into {eq}`eq_state` gives: ```{math} :label: eq_rn_dynamics -x_{t+1} = (A - C\lambda)\,x_t + C\,\tilde\varepsilon_{t+1}, \qquad \tilde\varepsilon_{t+1} \sim \mathcal{N}(0,I) +x_{t+1} = (A - C\lambda) x_t + C \tilde\varepsilon_{t+1}, \qquad \tilde\varepsilon_{t+1} \sim \mathcal{N}(0,I) ``` -The risk-neutral dynamics assert that the shock distribution $\varepsilon_{t+1}$ has conditional mean $-\lambda_t$ instead of $0$. - -The dependence of $\lambda_t = \lambda\,x_t$ on the state modifies the dynamics relative to the econometrician's model. +The dependence of $\lambda_t = \lambda x_t$ on the state modifies the dynamics relative to the econometrician's model. ### Expectation under a twisted distribution -The mathematical expectation of $y_{t+1}$ under the probability distribution -twisted by likelihood ratio $m_{t+1}$ is +A useful notational shorthand captures the connection between the two measures: the expected value of $y_{t+1}$ under the twisted distribution can be computed as a likelihood-ratio-weighted average under the original distribution: $$ -\tilde{E}_t\,y_{t+1} = E_t\,m_{t+1}\,y_{t+1} +\tilde{E}_t y_{t+1} = E_t m_{t+1} y_{t+1} $$ -Under the risk-neutral dynamics, the term structure theory becomes: +With this notation, the term structure recursion under risk-neutral dynamics takes a particularly clean form: $$ -p_t(1) = \exp(-r_t), \qquad p_t(n+1) = \exp(-r_t)\,\tilde{E}_t\,p_{t+1}(n), \qquad p_t(n) = \exp(\tilde{B}_n\,x_t) +p_t(1) = \exp(-r_t), \qquad p_t(n+1) = \exp(-r_t) \tilde{E}_t p_{t+1}(n), \qquad p_t(n) = \exp(\tilde{\bar{A}}_n + \tilde{B}_n x_t) $$ -These are the same formulas as rational-expectations asset pricing, but -expectations are taken with respect to a probability measure **twisted by -risk aversion**. +These are the same formulas as rational-expectations asset pricing, but expectations are taken with respect to a probability measure *twisted by risk aversion*. -## Python implementation +The derivation of the recursive bond price coefficients is the same as in {ref}`Exercise 3 ` of {doc}`Affine Models of Asset Prices `, applied here under the risk-neutral dynamics {eq}`eq_rn_dynamics`. -We implement the state-space model and its asset pricing implications. +Now let's implement the state-space model and its asset pricing implications. ```{code-cell} ipython3 class LikelihoodRatioModel: """ - Gaussian state-space model with likelihood ratio twists. + Gaussian state-space model with an augmented constant state. - x_{t+1} = A x_t + C ε_{t+1}, ε ~ N(0,I) + x_{t+1} = A x_t + C ε_{t+1}, ε ~ N(0,I), x_t[0] = 1 y_{t+1} = D x_t + G ε_{t+1} - r_t = delta_0 + r_bar'x_t, λ_t = Λ x_t + r_t = r_bar'x_t, λ_t = Λ x_t """ - def __init__(self, A, C, D, G, r_bar, Λ, δ_0=0.0): + def __init__(self, A, C, D, G, r_bar, Λ): self.A = np.atleast_2d(A).astype(float) self.C = np.atleast_2d(C).astype(float) self.D = np.atleast_2d(D).astype(float) self.G = np.atleast_2d(G).astype(float) self.r_bar = np.asarray(r_bar, dtype=float) self.Λ = np.atleast_2d(Λ).astype(float) - self.δ_0 = float(δ_0) self.n = self.A.shape[0] self.k = self.C.shape[1] # risk-neutral dynamics self.A_Q = self.A - self.C @ self.Λ + self.A_core = self.A[1:, 1:] + self.A_Q_core = self.A_Q[1:, 1:] def short_rate(self, x): - return self.δ_0 + self.r_bar @ x + return self.r_bar @ x def risk_prices(self, x): return self.Λ @ x @@ -342,11 +432,10 @@ class LikelihoodRatioModel: """Bond price coefficients: log p_t(n) = A_bar_n + B_n' x_t.""" A_bar = np.zeros(n_max + 1) B = np.zeros((n_max + 1, self.n)) - A_bar[1] = -self.δ_0 B[1] = -self.r_bar CCt = self.C @ self.C.T for nn in range(1, n_max): - A_bar[nn + 1] = A_bar[nn] + 0.5 * B[nn] @ CCt @ B[nn] - self.δ_0 + A_bar[nn + 1] = A_bar[nn] + 0.5 * B[nn] @ CCt @ B[nn] B[nn + 1] = self.A_Q.T @ B[nn] - self.r_bar return A_bar, B @@ -359,22 +448,51 @@ class LikelihoodRatioModel: def simulate(self, x0, T, rng=None): """Simulate under the econometrician's model.""" if rng is None: - rng = np.random.default_rng(42) + rng = np.random.default_rng(0) X = np.zeros((T + 1, self.n)) X[0] = x0 for t in range(T): X[t + 1] = self.A @ X[t] + self.C @ rng.standard_normal(self.k) + X[t + 1, 0] = 1.0 return X def simulate_twisted(self, x0, T, rng=None): """Simulate under the risk-neutral (twisted) model.""" if rng is None: - rng = np.random.default_rng(42) + rng = np.random.default_rng(0) X = np.zeros((T + 1, self.n)) X[0] = x0 for t in range(T): X[t + 1] = self.A_Q @ X[t] + self.C @ rng.standard_normal(self.k) + X[t + 1, 0] = 1.0 return X + + +def augment_state_space(A_core, C_core, D_core, G, r_bar_core, r_const=0.0): + """Add a leading constant state x0_t = 1 to a linear Gaussian model.""" + A_core = np.atleast_2d(A_core).astype(float) + C_core = np.atleast_2d(C_core).astype(float) + D_core = np.atleast_2d(D_core).astype(float) + G = np.atleast_2d(G).astype(float) + r_bar_core = np.asarray(r_bar_core, dtype=float) + + n_core = A_core.shape[0] + k = C_core.shape[1] + + A = np.eye(n_core + 1) + A[1:, 1:] = A_core + + C = np.zeros((n_core + 1, k)) + C[1:, :] = C_core + + D = np.hstack([np.zeros((D_core.shape[0], 1)), D_core]) + r_bar = np.concatenate(([r_const], r_bar_core)) + return A, C, D, G, r_bar + + +def augment_state(x_core): + """Augment a stochastic state vector with a leading constant 1.""" + return np.concatenate(([1.0], np.asarray(x_core, dtype=float))) ``` ### Example: a two-factor model @@ -383,49 +501,58 @@ We set up a two-factor model with a persistent "level" factor and a less persistent "slope" factor, mimicking the U.S. yield curve. ```{code-cell} ipython3 -A = np.array([[0.97, -0.03], - [0.00, 0.90]]) +A_core = np.array([[0.97, -0.03], + [0.00, 0.90]]) -C = np.array([[0.007, 0.000], - [0.000, 0.010]]) +C_core = np.array([[0.007, 0.000], + [0.000, 0.010]]) -D = np.array([[0.5, 0.3]]) # consumption growth loading -G = np.array([[0.004, 0.003]]) # consumption shock loading +D_core = np.array([[0.5, 0.3]]) # consumption growth loading +G = np.array([[0.004, 0.003]]) # consumption shock loading -δ_0 = 0.004 # short rate intercept (~4.8% annual) -r_bar = np.array([0.06, 0.04]) # short rate loading +r_const = 0.004 # short rate intercept (~4.8% annual) +r_bar_core = np.array([0.06, 0.04]) # short rate loading -# Risk prices: λ_t = Λ x_t (state-dependent) -Λ = np.array([[-3.0, 0.0], +# Augment with a leading constant state +A, C, D, G, r_bar = augment_state_space( + A_core, C_core, D_core, G, r_bar_core, r_const=r_const +) + +# Risk prices: no constant loading in this benchmark calibration +Λ = np.hstack([ + np.zeros((2, 1)), + np.array([[-3.0, 0.0], [ 0.0, -6.0]]) +]) -model = LikelihoodRatioModel(A, C, D, G, r_bar, Λ, δ_0=δ_0) +model = LikelihoodRatioModel(A, C, D, G, r_bar, Λ) -print(f"Eigenvalues of A: {eigvals(A).round(4)}") -print(f"Eigenvalues of A_Q: {eigvals(model.A_Q).round(4)}") -assert all(np.abs(eigvals(model.A_Q)) < 1), "A_Q must be stable!" +print(f"Eigenvalues of check(A): {eigvals(model.A_core).round(4)}") +print(f"Eigenvalues of check(A_Q): {eigvals(model.A_Q_core).round(4)}") +assert all(np.abs(eigvals(model.A_Q_core)) < 1), "check(A_Q) must be stable!" ``` -### Yield curves across states +The yield curve's shape depends on the current state $x_t$. + +We evaluate the model at three representative states to see how the two factors, level and slope, generate upward-sloping, relatively flat, and inverted yield curves. ```{code-cell} ipython3 n_max = 120 maturities = np.arange(1, n_max + 1) states = { - "Low level, positive slope": np.array([-0.005, 0.01]), - "Medium": np.array([ 0.008, 0.003]), - "High level, negative slope": np.array([ 0.025, -0.01]), + "Normal (upward-sloping)": augment_state(np.array([-0.005, -0.015])), + "Relatively flat": augment_state(np.array([ 0.008, -0.005])), + "Inverted": augment_state(np.array([ 0.020, 0.010])), } fig, ax = plt.subplots(figsize=(9, 5)) for label, x in states.items(): - y = model.yields(x, n_max) * 1200 # annualise (monthly → ×1200) + y = model.yields(x, n_max) * 1200 # annualise (monthly, x1200) ax.plot(maturities, y, lw=2, label=label) ax.set_xlabel("Maturity (months)") ax.set_ylabel("Yield (annualised %)") -ax.set_title("Yield curves under different states") ax.legend() plt.tight_layout() plt.show() @@ -433,20 +560,40 @@ plt.show() ### Econometrician's model vs. risk-neutral model -A key implication is that the risk-neutral dynamics -$x_{t+1} = (A - C\Lambda)\,x_t + C\,\tilde\varepsilon_{t+1}$ -differ from the econometrician's dynamics $x_{t+1} = A\,x_t + C\,\varepsilon_{t+1}$. +The econometrician estimates state dynamics under the **physical measure** $P$, which governs the actual data-generating process: + +$$ +x_{t+1} = A x_t + C \varepsilon_{t+1}, \qquad \varepsilon_{t+1} \sim \mathcal{N}(0,I) \text{ under } P +$$ + +The **risk-neutral measure** $Q$ is the probability distribution twisted by the likelihood ratio $m_{t+1}^\lambda$. + +Under $Q$, the state evolves as + +$$ +x_{t+1} = A_Q x_t + C \tilde\varepsilon_{t+1}, \qquad \tilde\varepsilon_{t+1} \sim \mathcal{N}(0,I) \text{ under } Q +$$ + +where $A_Q = A - C\lambda$. + +The two measures agree on which events are possible but disagree on their probabilities. + +The physical measure $P$ governs forecasting and estimation, while the risk-neutral measure $Q$ governs asset pricing. ```{code-cell} ipython3 print("A:\n", model.A) print("\nA_Q = A - CΛ:\n", model.A_Q) -print(f"\nEigenvalues of A: {eigvals(model.A).round(4)}") -print(f"Eigenvalues of A_Q: {eigvals(model.A_Q).round(4)}") +print(f"\nEigenvalues of check(A): {eigvals(model.A_core).round(4)}") +print(f"Eigenvalues of check(A_Q): {eigvals(model.A_Q_core).round(4)}") ``` +To see the difference in action, we simulate both models from the same initial state using the same shock sequence. + +Both simulations draw the same standard normal random vectors, but the transition matrices $A$ and $A_Q$ govern how those shocks cumulate over time. + ```{code-cell} ipython3 T = 300 -x0 = np.array([0.01, 0.005]) +x0 = augment_state(np.array([0.01, 0.005])) rng1 = np.random.default_rng(123) rng2 = np.random.default_rng(123) # same seed for comparability @@ -454,30 +601,36 @@ X_econ = model.simulate(x0, T, rng=rng1) X_rn = model.simulate_twisted(x0, T, rng=rng2) fig, axes = plt.subplots(2, 1, figsize=(10, 7), sharex=True) -for i, (ax, lab) in enumerate(zip(axes, ["Level factor", "Slope factor"])): - ax.plot(X_econ[:, i], 'steelblue', lw=1.2, +for idx, (ax, lab) in zip([1, 2], zip(axes, ["Level factor", "Slope factor"])): + ax.plot(X_econ[:, idx], 'steelblue', lw=2, label="Econometrician (P)") - ax.plot(X_rn[:, i], 'firebrick', lw=1.2, + ax.plot(X_rn[:, idx], 'firebrick', lw=2, alpha=0.8, label="Risk-neutral (Q)") ax.set_ylabel(lab) ax.legend() axes[1].set_xlabel("Period") -axes[0].set_title("State paths: physical vs. risk-neutral") plt.tight_layout() plt.show() ``` +Both factors are more persistent under $Q$ than under $P$: the eigenvalues of the stochastic block $\check{A}_Q$ are closer to unity than those of $\check{A}$. + +The risk-neutral paths (red) exhibit wider swings and slower mean reversion. + +This is because the negative risk prices $\lambda$ in our calibration make $A_Q = A - C\lambda$ larger, slowing the rate at which factors revert to zero. + +The gap between the $P$ and $Q$ dynamics is precisely what generates a term premium in bond yields, because long bonds are priced under $Q$, where risks look more persistent. + ## An identification challenge -The vector $\lambda_t$ can be interpreted as either: +The risk price vector $\lambda_t = \lambda x_t$ can be interpreted as either: - a **risk price vector** expressing the representative agent's risk aversion, or - the representative agent's **belief distortion** relative to the econometrician's model. -The asset pricing formulas {eq}`eq_stock_lr`–{eq}`eq_ts_lr` are identical under both -interpretations, and so are the econometric fits. +Because the pricing formulas {eq}`eq_stock_lr` to {eq}`eq_ts_lr` depend only on the composite $\lambda_t$, not on whether it reflects risk aversion or belief distortion, the two interpretations produce identical asset prices and econometric fits. > Relative to the model of a risk-averse representative investor with rational > expectations, a model of a risk-neutral investor with appropriately mistaken @@ -488,27 +641,26 @@ This insight was articulated by {cite:t}`HST_1999` and To distinguish risk aversion from belief distortion, one needs either *more information* (the PSS approach using survey data) or *more theory* -(the Hansen–Szőke robust control approach), or both (the {cite:t}`szoke2022estimating` approach). +(the Hansen-Szőke robust control approach), or both (the {cite:t}`szoke2022estimating` approach). ```{code-cell} ipython3 -x_test = np.array([0.01, 0.005]) +x_test = augment_state(np.array([0.01, 0.005])) y_risk_averse = model.yields(x_test, 60) * 1200 -# "Mistaken belief" model: zero risk prices but twisted A +# Mistaken belief model model_mistaken = LikelihoodRatioModel( A=model.A_Q, C=C, D=D, G=G, - r_bar=r_bar, Λ=np.zeros_like(Λ), δ_0=δ_0 + r_bar=r_bar, Λ=np.zeros_like(Λ) ) y_mistaken = model_mistaken.yields(x_test, 60) * 1200 fig, ax = plt.subplots(figsize=(8, 5)) -ax.plot(np.arange(1, 61), y_risk_averse, 'steelblue', lw=3, +ax.plot(np.arange(1, 61), y_risk_averse, 'steelblue', lw=2, label='Risk averse + rational expectations') -ax.plot(np.arange(1, 61), y_mistaken, 'firebrick', lw=1.5, ls='--', +ax.plot(np.arange(1, 61), y_mistaken, 'firebrick', lw=2, ls='--', label='Risk neutral + mistaken beliefs') ax.set_xlabel("Maturity (months)") ax.set_ylabel("Yield (annualised %)") -ax.set_title("Observational equivalence") ax.legend() plt.tight_layout() plt.show() @@ -523,14 +675,14 @@ Without additional information (e.g., surveys of forecasters), we cannot tell th ### The PSS framework -{cite:t}`piazzesi2015trend` (henceforth PSS) exploit data on -professional forecasters' expectations to decompose the likelihood ratio -into risk prices and belief distortions. Their setup posits: +{cite:t}`piazzesi2015trend` (henceforth PSS) exploit data on professional forecasters' expectations to decompose the likelihood ratio into risk prices and belief distortions. + +Their setup posits: - The representative agent's risk aversion leads him to price risks - $\varepsilon_{t+1}$ with prices $\lambda_t^* = \lambda^* x_t$. -- The representative agent has **twisted beliefs** $(A^*, C) = (A - Cw^*, C)$ - relative to the econometrician's model $(A, C)$. + $\varepsilon_{t+1}$ with prices $\lambda_t^* = \lambda^* x_t$, where $\lambda^*$ is a $k \times n$ matrix. +- The representative agent has **twisted beliefs** $(A^*, C) = (A - C W^*, C)$ + relative to the econometrician's model $(A, C)$, where $W^*$ is a $k \times n$ matrix of belief distortion coefficients, so that $w_t^* = W^* x_t$. - Professional forecasters use the twisted beliefs $(A^*, C)$ to answer survey questions about their forecasts. @@ -539,44 +691,64 @@ into risk prices and belief distortions. Their setup posits: PSS proceed in four steps: 1. Use data $\{x_t\}_{t=0}^T$ to estimate the econometrician's model $A$, $C$. -2. Project experts' forecasts $\{\hat{x}_{t+1}\}$ on $x_t$ to obtain - $\hat{x}_{t+1} = A^* x_t$ and interpret $A^*$ as incorporating belief +2. Project experts' one-step-ahead forecasts $E_t^*[x_{t+1}]$ on $x_t$ to obtain + $E_t^*[x_{t+1}] = A^* x_t$ and interpret $A^*$ as incorporating belief distortions. -3. Back out the mean distortion $w^* x_t = -C^{-1}(A^* - A) x_t$ to the - density of $\varepsilon_{t+1}$. +3. Back out the mean distortion matrix from the stochastic block: + + $$ + W^* = -\check{C}^{-1}(A^*_{2:n,\cdot} - A_{2:n,\cdot}) + $$ + + so that $w_t^* = W^* x_t$ is the state-dependent mean shift applied to the + density of $\varepsilon_{t+1}$. (This requires $\check{C}$ to be invertible.) 4. Reinterpret the $\lambda$ estimated by the rational-expectations econometrician - as $\lambda = \lambda^* + w^*$, where $\lambda_t^* = \lambda^* x_t$ is the + as $\lambda = \lambda^* + W^*$, where $\lambda_t^* = \lambda^* x_t$ is the (smaller) price of risk vector actually charged by the representative agent with distorted beliefs. -An econometrician who mistakenly imposes rational expectations estimates risk -prices $\lambda_t$ that sum two parts: -- *smaller risk prices* $\lambda_t^*$ actually charged by the erroneous-beliefs - representative agent, and -- *conditional mean distortions* $w_t^*$ of the risks $\varepsilon_{t+1}$ that +An econometrician who mistakenly imposes rational expectations estimates risk prices $\lambda_t = \lambda x_t$ that sum two parts: +- *smaller risk prices* $\lambda_t^* = \lambda^* x_t$ actually charged by the + representative agent with mistaken beliefs, and +- *conditional mean distortions* $w_t^* = W^* x_t$ of the risks $\varepsilon_{t+1}$ that the twisted-beliefs representative agent's model displays relative to the econometrician's. -### Numerical illustration +We illustrate this using a simple numerical example with the same two-factor structure as above. + +PSS find that experts perceive the level and slope of the yield curve to be *more persistent* than the econometrician's estimates imply. + +Hence we set up the numbers to reflect that finding, with the experts' subjective transition matrix $A^*$ having larger eigenvalues than the econometrician's $A$ + ```{code-cell} ipython3 -A_econ = np.array([[0.97, -0.03], - [0.00, 0.90]]) +A_econ_core = np.array([[0.97, -0.03], + [0.00, 0.90]]) -A_star = np.array([[0.985, -0.025], # experts' subjective transition - [0.000, 0.955]]) +A_star_core = np.array([[0.985, -0.025], # experts' subjective transition + [0.000, 0.955]]) -C_mat = np.array([[0.007, 0.000], - [0.000, 0.010]]) +C_mat_core = np.array([[0.007, 0.000], + [0.000, 0.010]]) -# Belief distortion: w* = -C⁻¹(A* - A) -w_star = -inv(C_mat) @ (A_star - A_econ) +A_econ, C_mat, _, _, _ = augment_state_space( + A_econ_core, C_mat_core, np.zeros((1, 2)), np.zeros((1, 2)), np.zeros(2) +) +A_star, _, _, _, _ = augment_state_space( + A_star_core, C_mat_core, np.zeros((1, 2)), np.zeros((1, 2)), np.zeros(2) +) -Λ_total = np.array([[-3.0, 0.0], - [ 0.0, -6.0]]) -Λ_true = Λ_total - w_star # true risk prices +# Belief distortion recovered from the stochastic block +W_star = -np.linalg.solve(C_mat[1:, :], A_star[1:, :] - A_econ[1:, :]) + +Λ_total = np.hstack([ + np.zeros((2, 1)), + np.array([[-3.0, 0.0], + [ 0.0, -6.0]]) +]) +Λ_true = Λ_total - W_star # true risk prices -print("Belief distortion w*:\n", w_star.round(3)) +print("Belief distortion W*:\n", W_star.round(3)) print("\nTotal risk prices Λ:\n", Λ_total.round(3)) print("\nTrue risk prices Λ*:\n", Λ_true.round(3)) ``` @@ -587,9 +759,9 @@ fig, axes = plt.subplots(1, 2, figsize=(12, 5)) for i, (ax, lab) in enumerate(zip(axes, ["Level factor risk price", "Slope factor risk price"])): - x_vals = np.zeros((200, 2)) - x_vals[:, i] = x_grid - x_vals[:, 1 - i] = 0.005 + x_vals = np.ones((200, 3)) + x_vals[:, 1:] = 0.005 + x_vals[:, i + 1] = x_grid λ_total = np.array([Λ_total @ x for x in x_vals])[:, i] λ_true = np.array([Λ_true @ x for x in x_vals])[:, i] @@ -601,52 +773,40 @@ for i, (ax, lab) in enumerate(zip(axes, ax.fill_between(x_grid, λ_true, λ_total, alpha=0.15, color='firebrick', label=r"$w^*_t$ (belief distortion)") ax.axhline(0, color='black', lw=0.5) - ax.set_xlabel(f"State $x_{{{i+1},t}}$") + ax.set_xlabel(f"Factor $\\check{{x}}_{{{i+1},t}}$") ax.set_ylabel(lab) ax.legend() -axes[0].set_title("PSS decomposition: level") -axes[1].set_title("PSS decomposition: slope") plt.tight_layout() plt.show() ``` -PSS find that experts perceive the level and slope of the yield curve to be *more persistent* than the econometrician's estimates imply. - -Subjective risk prices $\lambda^* x_t$ vary less than the $\lambda x_t$ estimated by the rational-expectations econometrician. +Subjective risk prices $\lambda^* x_t$ vary less than the $\lambda x_t$ estimated by the rational-expectations econometrician. +However, PSS offer no explanation for *why* beliefs are distorted. -## Rationalizing rational expectations +Are they mistakes, ignorance of good econometrics, or something else? -### The informal justification +## A theory of belief distortions: robust control The standard justification for rational expectations treats it as the outcome of learning from an infinite history: least-squares learning converges to rational expectations. -The argument requires that: - -- agents know correct functional forms, and -- a stochastic approximation argument partitions dynamics into a fast part - (that justifies a law of large numbers) and a slow part (that justifies an ODE). +That argument requires agents to know correct functional forms and relies on a stochastic approximation argument that partitions dynamics into a fast part (justifying a law of large numbers) and a slow part (justifying an ODE). However, long intertemporal dependencies make *rates of convergence slow*. -### Good econometricians - -Good econometricians have limited data and only hunches about functional forms. - -They fear that their fitted models are incorrect. +Good econometricians have limited data and only hunches about functional forms, and they fear that their fitted models are incorrect. An agent who is like a good econometrician: - has a parametric model estimated from limited data, -- acknowledges that many other specifications fit nearly as well — other parameter +- acknowledges that many other specifications fit nearly as well, including other parameter values, other functional forms, omitted variables, neglected nonlinearities, and history dependencies, - fears that one of those other models actually prevails, and -- seeks "good enough" decisions under *all* such alternative models — **robustness**. +- seeks "good enough" decisions under *all* such alternative models, i.e. **robustness**. - -## A theory of belief distortions: robust control +Robust control theory formalises this idea by having the agent optimally distort probability assessments toward a worst-case scenario, producing belief distortions that look like the "mistakes" identified by PSS but that arise from a coherent response to model uncertainty rather than from ignorance. ### Hansen's dubious agent @@ -658,45 +818,66 @@ Inspired by robust control theory, consider a dubious investor who: - wants a valuation that is good for every model in the entropy ball, and - constructs a *lower bound* on values and a *worst-case model* that attains it. -### Valuation under the econometrician's model - -Taking the log consumption process to be linear Gaussian with shocks -$\varepsilon_{t+1} \sim \mathcal{N}(0,I)$: +Under the econometrician's linear Gaussian model with shocks $\varepsilon_{t+1} \sim \mathcal{N}(0,I)$: $$ -c_{t+1} - c_t = D\,x_t + G\,\varepsilon_{t+1}, \qquad x_{t+1} = A\,x_t + C\,\varepsilon_{t+1} +c_{t+1} - c_t = D x_t + G \varepsilon_{t+1}, \qquad x_{t+1} = A x_t + C \varepsilon_{t+1} $$ the dubious agent's value function is $$ -V(x_0, c_0) := E\!\left[\sum_{t=0}^{\infty} \beta^t\,c_t \;\middle|\; x_0, c_0\right] = c_0 + \beta\,E\!\left[V(x_1, c_1) \;\middle|\; x_0, c_0\right] +V(x_0, c_0) := E \left[\sum_{t=0}^{\infty} \beta^t c_t \middle| x_0, c_0\right] = c_0 + \beta E \left[V(x_1, c_1) \middle| x_0, c_0\right] $$ +Note that the objective is *linear* in consumption. + +There is no concave utility function $u(c_t)$. + +All aversion to uncertainty here comes from the *worst-case model selection* (the $\min$ over likelihood ratios below), not from utility curvature. + +This separation is a key feature of the robust control approach: the agent expresses doubt through the entropy ball, rather than through a curved utility function. + ### The sequence problem -The dubious agent solves: +The dubious agent solves a *min* problem in which a malevolent "nature" chooses the worst-case probability distortion subject to an entropy budget. + +Nature's instrument is a sequence of one-step likelihood ratios $m_{t+1}$, each of which distorts the conditional distribution of $\varepsilon_{t+1}$ given information at $t$. + +These increments cumulate into a date-$t$ likelihood ratio $M_t = \prod_{s=0}^{t-1} m_{s+1}$ (with $M_0 = 1$) that converts the econometrician's probability measure into the distorted one. + +The objective, evaluated under the econometrician's measure, weights each period's consumption by $M_t$: ```{math} :label: eq_hansen_seq -J(x_0, c_0 \mid \eta) := \min_{\{m_{t+1}\}} E\!\left[\sum_{t=0}^{\infty} \beta^t\,M_t\,c_t \;\middle|\; x_0, c_0\right] +J(x_0, c_0 \mid \eta) := \min_{\{m_{t+1}\}} E \left[\sum_{t=0}^{\infty} \beta^t M_t c_t \middle| x_0, c_0\right] ``` -subject to +The minimisation is subject to three sets of constraints. + +First, the economy evolves according to the econometrician's model: $$ -c_{t+1} - c_t = D\,x_t + G\,\varepsilon_{t+1}, \qquad x_{t+1} = A\,x_t + C\,\varepsilon_{t+1} +c_{t+1} - c_t = D x_t + G \varepsilon_{t+1}, \qquad x_{t+1} = A x_t + C \varepsilon_{t+1} $$ +Second, nature's total probability distortion, measured by discounted entropy, must remain within a budget $\eta$: + $$ -E\!\left[\sum_{t=0}^{\infty} \beta^t\,M_t\,E\!\left[m_{t+1}\log m_{t+1} \;\middle|\; x_t, c_t\right] \;\middle|\; x_0, c_0\right] \leq \eta +E \left[\sum_{t=0}^{\infty} \beta^t M_t E \left[m_{t+1}\log m_{t+1} \middle| x_t, c_t\right] \middle| x_0, c_0\right] \leq \eta $$ +Third, the incremental likelihood ratios must be valid probability distortions that cumulate multiplicatively: + $$ -M_{t+1} = M_t\,m_{t+1}, \qquad E[m_{t+1} \mid x_t, c_t] = 1, \qquad M_0 = 1 +M_{t+1} = M_t m_{t+1}, \qquad E[m_{t+1} \mid x_t, c_t] = 1, \qquad M_0 = 1 $$ +The cumulative likelihood ratio $M_t = \prod_{s=0}^{t-1} m_{s+1}$ converts the original probability measure into the distorted one. + +The $M_t$ weighting ensures entropy is measured under the *distorted* measure and the $\beta^t$ discounting means future divergences are penalised less, admitting persistent alternatives. + The likelihood ratio process $\{M_t\}_{t=0}^{\infty}$ is a multiplicative **martingale**. ```{figure} /_static/lecture_specific/risk_aversion_or_mistaken_beliefs/eggs_backus.png @@ -707,43 +888,55 @@ Discounted entropy ball around the econometrician's model. Discounted entropy includes models that undiscounted entropy excludes. -Undiscounted entropy over infinite sequences excludes many models that are very difficult to distinguish from the econometrician's model with limited data, because undiscounted entropy includes only models that share laws of large numbers. +Undiscounted entropy over infinite sequences requires alternative models to share the same long-run averages as the baseline, thereby excluding models that differ only in persistent, low-frequency dynamics. + +But those persistent alternatives are precisely the models that are hardest to distinguish from the econometrician's model with finite data and that matter most for pricing long-lived assets. + +Discounted entropy, by treating future divergences less severely, admits these statistically elusive but economically important alternatives into the set of models that the dubious agent contemplates. ### Entropy and the likelihood ratio -With the log-normal likelihood ratio +When the likelihood ratio takes the log-normal form used throughout this lecture, entropy simplifies dramatically. + +Writing the one-step likelihood ratio in terms of a distortion vector $w_t$: $$ -m_{t+1} := \exp\!\left(-\frac{w_t' w_t}{2} - w_t'\,\varepsilon_{t+1}\right) +m_{t+1} := \exp \left(-\frac{w_t^\top w_t}{2} - w_t^\top \varepsilon_{t+1}\right) $$ -conditional entropy takes the simple form +and computing $E[m_{t+1}\log m_{t+1} \mid x_t]$, the cross term $w_t^\top \varepsilon_{t+1}$ averages to zero, leaving only: $$ -E\!\left[m_{t+1}\log m_{t+1} \;\middle|\; x_t, c_t\right] = \frac{1}{2}\,w_t' w_t +E \left[m_{t+1}\log m_{t+1} \middle| x_t, c_t\right] = \frac{1}{2} w_t^\top w_t $$ -Substituting into {eq}`eq_hansen_seq` yields the reformulated problem: +This means that conditional entropy equals half the squared norm of the distortion vector — it measures how far the distorted mean $-w_t$ is from the baseline mean of zero. + +Substituting this expression into {eq}`eq_hansen_seq` and performing a change of measure (replacing $E[\cdot]$ with $E^w[\cdot]$ under the distorted model) yields a reformulated problem in which nature directly chooses the mean shift $w_t$ rather than a likelihood ratio: ```{math} :label: eq_hansen_reform -J(x_0, c_0 \mid \eta) := \min_{\{w_t\}} E^w\!\left[\sum_{t=0}^{\infty} \beta^t\,c_t \;\middle|\; x_0, c_0\right] +J(x_0, c_0 \mid \eta) := \min_{\{w_t\}} E^w \left[\sum_{t=0}^{\infty} \beta^t c_t \middle| x_0, c_0\right] ``` -subject to +Under the distorted measure, $\tilde\varepsilon_{t+1} \sim \mathcal{N}(0, I)$, and we have substituted $\varepsilon_{t+1} = \tilde\varepsilon_{t+1} - w_t$ so that the mean shift $-w_t$ appears explicitly in the dynamics: $$ -c_{t+1} - c_t = D\,x_t + G\,(\tilde\varepsilon_{t+1} - w_t), \qquad x_{t+1} = A\,x_t + C\,(\tilde\varepsilon_{t+1} - w_t) +c_{t+1} - c_t = D x_t + G (\tilde\varepsilon_{t+1} - w_t), \qquad x_{t+1} = A x_t + C (\tilde\varepsilon_{t+1} - w_t) $$ +The entropy constraint now takes the transparent form of bounding the cumulative squared distortion: + $$ -\frac{1}{2}\,E^w\!\left[\sum_{t=0}^{\infty} \beta^t\,w_t' w_t \;\middle|\; x_0, c_0\right] \leq \eta +\frac{1}{2} E^w \left[\sum_{t=0}^{\infty} \beta^t w_t^\top w_t \middle| x_0, c_0\right] \leq \eta $$ +The shift $-w_t$ *reduces* expected consumption growth by $G w_t$ and shifts the state dynamics by $-C w_t$, which is how the worst-case model makes the agent worse off. + ### Outcome: constant worst-case distortion -The worst-case mean distortion turns out to be a *constant vector*: +Because the econometrician's model is linear Gaussian and the entropy constraint is a scalar bound $\eta$, the worst-case mean distortion turns out to be a *constant vector*: $$ w_t = \bar{w} @@ -751,7 +944,27 @@ $$ The consequence is that the contribution of $w_t$ to risk prices is *state-independent*. -This does *not* help explain countercyclical prices of risk (or prices of model uncertainty). +This does *not* help explain countercyclical prices of risk (or prices of model uncertainty), motivating the more refined "tilted" entropy ball in the next section. + +We compute $\bar{w}$ using the multiplier formulation developed in {ref}`the preceding section `, in which the parameter $\theta$ penalises entropy: larger $\theta$ means less concern about misspecification. + +In the multiplier formulation, the agent minimises + +$$ +E^w \left[\sum_{t=0}^\infty \beta^t \bigl(c_t + \tfrac{\theta}{2} w_t^\top w_t\bigr)\right] +$$ + +over $\{w_t\}$ subject to the shifted dynamics. + +Since $c_t = c_0 + \sum_{s=0}^{t-1}(D x_s + G \varepsilon_{s+1})$ and $\varepsilon_{s+1} = \tilde\varepsilon_{s+1} - w_s$, the first-order condition for $w_t$ balances the entropy penalty $\theta w_t$ against the marginal effect on discounted consumption: + +$$ +\theta \bar{w} = \frac{\beta}{1-\beta} G^\top + \beta C^\top v +$$ + +where $v$ solves $v = \frac{\beta}{1-\beta} D^\top + \beta A^\top v$, or equivalently $v = \beta (I - \beta A^\top)^{-1} D^\top / (1-\beta)$. + +The vector $v$ captures the discounted cumulative effect of a unit change in $x_t$ on future consumption. ```{code-cell} ipython3 def hansen_worst_case(A, C, D, G, β, θ): @@ -772,17 +985,152 @@ for θ in θ_values: print(f"{θ:>6.1f} {w[0]:>10.4f} {w[1]:>10.4f} {0.5 * w @ w:>10.4f}") ``` -The worst-case distortion $\bar{w}$ is constant — it does not depend on the state $x_t$. +The worst-case distortion $\bar{w}$ is constant: it does not depend on the state $x_t$. Larger $\theta$ (less concern about misspecification) yields a smaller distortion. +````{exercise} +:label: lr_exercise_2 + +Derive the formula for $\bar{w}$. + +1. Write the discounted consumption path as $\sum_{t=0}^\infty \beta^t c_t = \frac{c_0}{1-\beta} + \sum_{t=0}^\infty \beta^t \sum_{s=0}^{t-1}(D x_s - G w_s + G \tilde\varepsilon_{s+1})$. +2. Use the state recursion $x_{t+1} = A x_t - C w_t + C \tilde\varepsilon_{t+1}$ and take first-order conditions with respect to the constant $w_t = \bar{w}$. +3. Verify that the first-order condition gives $\theta \bar{w} = \frac{\beta}{1-\beta} G^\top + \beta C^\top v$ with $v = \beta(I - \beta A^\top)^{-1} D^\top / (1-\beta)$. +4. Check numerically that larger $\theta$ brings $\bar{w}$ closer to zero. + +```` + +````{solution} lr_exercise_2 +:class: dropdown + +For part 1, the consumption increment $\Delta c_{s+1} = Dx_s - G\bar{w} + G\tilde\varepsilon_{s+1}$ at date $s$ enters $c_t$ for every $t \geq s+1$, with total discounted weight $\frac{\beta^{s+1}}{1-\beta}$. + +Swapping the order of summation: + +$$ +E \left[\sum_{t=0}^\infty \beta^t c_t\right] = \frac{c_0}{1-\beta} + \frac{1}{1-\beta}\sum_{s=0}^\infty \beta^{s+1}\bigl(D E[x_s] - G\bar{w}\bigr) +$$ + +For part 2, define $S = \sum_{s=0}^\infty \beta^{s+1} E[x_s]$. + +From $E[x_{s+1}] = A E[x_s] - C\bar{w}$, multiply both sides by $\beta^{s+2}$ and sum over $s = 0, 1, \ldots$: + +$$ +S - \beta x_0 = \beta A S - \frac{\beta^2}{1-\beta}C\bar{w} +$$ + +Solving: $S = (I - \beta A)^{-1} \left(\beta x_0 - \frac{\beta^2}{1-\beta}C\bar{w}\right)$. + +Substituting back, the expected objective $E[\sum \beta^t(c_t + \frac{\theta}{2}\|\bar{w}\|^2)]$ depends on $\bar{w}$ only through the term $\frac{1}{1-\beta}(D S - \frac{\beta}{1-\beta}G\bar{w}) + \frac{\theta}{2(1-\beta)}\|\bar{w}\|^2$. + +For part 3, differentiate with respect to $\bar{w}$ and set to zero. + +The only part of $S$ that depends on $\bar{w}$ is $-\frac{\beta^2}{1-\beta}(I-\beta A)^{-1}C\bar{w}$, so $\nabla_{\bar{w}}(D S) = -\frac{\beta^2}{1-\beta}C^\top(I - \beta A^\top)^{-1}D^\top$. + +The first-order condition is: + +$$ +\frac{\theta}{1-\beta}\bar{w} = \frac{1}{1-\beta} \left(\frac{\beta}{1-\beta}G^\top + \frac{\beta^2}{1-\beta}C^\top(I - \beta A^\top)^{-1}D^\top\right) +$$ + +Simplifying: $\theta\bar{w} = \frac{\beta}{1-\beta}G^\top + \beta C^\top v$, where $v = \frac{\beta}{1-\beta}(I - \beta A^\top)^{-1}D^\top$. + +Therefore $\bar{w} = \frac{1}{\theta}\bigl(\frac{\beta}{1-\beta}G^\top + \beta C^\top v\bigr)$. + +For part 4, as $\theta \to \infty$, $\bar{w} = \frac{1}{\theta}(\cdots) \to 0$, which the numerical table confirms. + +```` + +(mult_pref_section)= +## Multiplier preferences + +The constraint formulation {eq}`eq_hansen_seq` bounds discounted entropy by $\eta$, but an equivalent **multiplier** formulation replaces the constraint with a penalty term weighted by a Lagrange multiplier $\theta$. + +The **multiplier preference** version of the dubious agent's problem is: + +```{math} +:label: eq_mult_seq + +\hat{J}(x_0, c_0 \mid \theta) := \min_{\{m_{t+1}\}} E \left[\sum_{t=0}^{\infty} \beta^t M_t\bigl(c_t + \theta m_{t+1}\log m_{t+1}\bigr) \middle| x_0, c_0\right] +``` + +with $M_{t+1} = M_t m_{t+1}$, $E[m_{t+1} \mid x_t, c_t] = 1$, $M_0 = 1$. + +To derive a Bellman equation, write the value as today's consumption plus the worst-case continuation: + +$$ +\hat{J}(x_t, c_t \mid \theta) = c_t + \min_{m_{t+1}} E \left[m_{t+1}\bigl[\beta \hat{J}(x_{t+1}, c_{t+1}) + \theta\log m_{t+1}\bigr] \middle| x_t, c_t\right] +$$ + +Solving the inner minimisation analytically (by completing the square in the exponential family) yields a closed-form expression: + +$$ += c_t - \theta\log E \left[\exp \left(-\frac{\beta \hat{J}(x_{t+1}, c_{t+1})}{\theta}\right) \middle| x_t, c_t\right] +$$ + +The second line defines the **risk-sensitivity operator** $T_t$: + +$$ +=: c_t + T_t \left[\beta \hat{J}(x_{t+1}, c_{t+1})\right] +$$ + +The minimising likelihood ratio that attains this value is: + +$$ +m_{t+1}^* \propto \exp \left(-\frac{\beta \hat{J}(x_{t+1}, c_{t+1})}{\theta}\right) +$$ + +By Lagrange multiplier theory, for the **corresponding dual pair** $(\tilde\theta, \eta)$, + +$$ +\hat{J}(x_t, c_t \mid \tilde\theta) = J(x_t, c_t \mid \eta) + \tilde\theta \eta +$$ + +Each choice of $\tilde\theta$ in the multiplier problem corresponds to a particular entropy bound $\eta(\tilde\theta)$ in the constraint problem, so the two formulations are equivalent. + +The operator $T_t$ defined above is a **risk-sensitivity operator** that maps the continuation value through an exponential tilt, downweighting good outcomes and upweighting bad ones. + +```{code-cell} ipython3 +def T_operator(V, θ, probs=None): + """Risk-sensitivity operator: T[V] = -θ log E[exp(-V/θ)].""" + if probs is None: + probs = np.ones(len(V)) / len(V) + V_s = -V / θ + max_v = np.max(V_s) + return -θ * (max_v + np.log(np.sum(probs * np.exp(V_s - max_v)))) + +rng = np.random.default_rng(0) +V_samples = rng.normal(loc=5.0, scale=1.0, size=10_000) +E_V = np.mean(V_samples) + +θ_grid = np.logspace(-1, 3, 50) +T_vals = [T_operator(V_samples, θ) for θ in θ_grid] + +fig, ax = plt.subplots(figsize=(8, 5)) +ax.semilogx(θ_grid, T_vals, 'firebrick', lw=2, label=r"$T_\theta[V]$") +ax.axhline(E_V, color='steelblue', lw=1.5, + ls='--', label=r"$E[V]$ (risk neutral)") +ax.set_xlabel(r"Robustness parameter $\theta$") +ax.set_ylabel("Value") +ax.legend() +ax.annotate(r"$\theta \to \infty$: risk neutral", + xy=(500, E_V), fontsize=11, color='steelblue', + xytext=(50, E_V - 0.8), + arrowprops=dict(arrowstyle='->', color='steelblue')) +plt.tight_layout() +plt.show() +``` + +As $\theta \to \infty$, the risk-sensitivity operator converges to the ordinary expectation $E[V]$, and the agent becomes risk neutral. + +As $\theta$ shrinks, the operator places more weight on bad outcomes, reflecting greater concern about model misspecification. ## Tilting the entropy ball ### Hansen and Szőke's more refined dubious agent -To generate *state-dependent* uncertainty prices, Hansen and Szőke introduce a -more refined dubious agent who: +To generate *state-dependent* uncertainty prices, Hansen and Szőke introduce a more refined dubious agent who: - shares the econometrician's model $A$, $C$, $D$, $G$, - expresses doubts by using a continuum of likelihood ratios to form a @@ -790,57 +1138,54 @@ more refined dubious agent who: - also insists that some martingales representing particular alternative *parametric* models be included in the discounted entropy ball. -The inclusion of those alternative parametric models *tilts* the entropy ball, -which affects the worst-case model in a way that can produce countercyclical -uncertainty prices. +The inclusion of those alternative parametric models *tilts* the entropy ball, which affects the worst-case model in a way that can produce countercyclical uncertainty prices. -### Concern about other parametric models +"Tilting" means replacing the constant entropy bound $\eta$ with a state-dependent bound $\xi(x_t)$ that is larger in states where the feared parametric alternative deviates more from the baseline. -The investor wants to include particular alternative models with +### The feared parametric model + +The investor wants the entropy ball to be large enough to include specific alternative models whose conditional entropy at each date is: $$ -E_t\!\left[\bar{m}_{t+1}\log\bar{m}_{t+1}\right] = \frac{1}{2}\,\bar{w}_t'\,\bar{w}_t = \xi(x_t) +E_t \left[\bar{m}_{t+1}\log\bar{m}_{t+1}\right] = \frac{1}{2} \bar{w}_t^\top \bar{w}_t =: \frac{1}{2}\xi(x_t) $$ -and discounted entropy +The function $\xi(x_t)$ measures how far the feared model's conditional distribution deviates from the baseline at state $x_t$, and the total discounted divergence of the feared model is: $$ -E^{\bar{w}}\!\left[\sum_{t=0}^{\infty} \beta^t\,\xi(x_t) \;\middle|\; x_0, c_0\right] +\frac{1}{2} E^{\bar{W}} \left[\sum_{t=0}^{\infty} \beta^t \xi(x_t) \middle| x_0, c_0\right] $$ -This is accomplished by replacing the earlier entropy constraint with +To ensure this feared model lies inside the entropy ball, we replace the earlier constant bound $\eta$ with a state-dependent budget: ```{math} :label: eq_tilted_constraint -\frac{1}{2}\,E^w\!\left[\sum_{t=0}^{\infty} \beta^t\,w_t' w_t \;\middle|\; x_0, c_0\right] \leq E^w\!\left[\sum_{t=0}^{\infty} \beta^t\,\xi(x_t) \;\middle|\; x_0, c_0\right] +\frac{1}{2} E^w \left[\sum_{t=0}^{\infty} \beta^t w_t^\top w_t \middle| x_0, c_0\right] \leq \frac{1}{2} E^w \left[\sum_{t=0}^{\infty} \beta^t \xi(x_t) \middle| x_0, c_0\right] ``` The time-$t$ contributions to the right-hand side of {eq}`eq_tilted_constraint` relax the discounted entropy constraint in states $x_t$ in which $\xi(x_t)$ is larger. This sets the stage for *state-dependent* mean distortions in the worst-case model. -### Concern about bigger long-run risk - -Inspired by {cite:t}`Bansal_Yaron_2004`, an agent fears particular long-run risks -expressed by +Inspired by {cite:t}`Bansal_Yaron_2004`, a concrete form of this concern is that the true state dynamics are more persistent than the econometrician's model implies, expressed by $$ -x_{t+1} = \bar{A}\,x_t + C\,\tilde\varepsilon_{t+1} +x_{t+1} = \bar{A} x_t + C \tilde\varepsilon_{t+1} $$ -This corresponds to $\bar{w}_t = \bar{w}\,x_t$ with +Since $\bar{A} = A - C\bar{W}$, this feared model is equivalent to shifting the mean of $\varepsilon_{t+1}$ by $-\bar{W}x_t$, giving $\bar{w}_t = \bar{W} x_t$ with $$ -\bar{w} = -C^{-1}(\bar{A} - A) +\bar{W} = -\check{C}^{-1}(\bar{A}_{2:n,\cdot} - A_{2:n,\cdot}) $$ -which implies a *quadratic* $\xi$ function: +(again using the assumption that $\check{C}$ is square and invertible), which implies a *quadratic* $\xi$ function: ```{math} :label: eq_xi -\xi(x_t) := x_t'\,\bar{w}'\bar{w}\,x_t =: x_t'\,\Xi\,x_t +\xi(x_t) := x_t^\top \bar{W}^\top\bar{W} x_t =: x_t^\top \Xi x_t ``` ```{figure} /_static/lecture_specific/risk_aversion_or_mistaken_beliefs/eggs_backus2.png @@ -849,41 +1194,84 @@ Tilted discounted entropy balls. Including particular parametric alternatives wi ### The Szőke agent's sequence problem -The resulting linear-quadratic problem is: +As in the multiplier preferences section, we convert the constraint problem into an unconstrained one by attaching a Lagrange multiplier $\tilde\theta \geq 0$ to the tilted entropy constraint {eq}`eq_tilted_constraint`. + +The penalty $\tilde\theta(w_t^\top w_t - x_t^\top \Xi x_t)/2$ now has two terms: the first penalises the agent's distortion, while the second rewards distortions in states where the feared model deviates more, creating a state-dependent entropy budget: ```{math} :label: eq_szoke_seq -J(x_0, c_0 \mid \Xi) := \max_{\tilde\theta \geq 0}\;\min_{\{w_t\}}\; E^w\!\left[\sum_{t=0}^{\infty} \beta^t\,c_t + \tilde\theta\,\frac{1}{2}\sum_{t=0}^{\infty} \beta^t\bigl(w_t' w_t - x_t'\,\Xi\,x_t\bigr) \;\middle|\; x_0, c_0\right] +J(x_0, c_0 \mid \Xi) := \max_{\tilde\theta \geq 0} \min_{\{w_t\}} E^w \left[\sum_{t=0}^{\infty} \beta^t c_t + \tilde\theta \frac{1}{2}\sum_{t=0}^{\infty} \beta^t\bigl(w_t^\top w_t - x_t^\top \Xi x_t\bigr) \middle| x_0, c_0\right] ``` -subject to +The dynamics under the distorted measure remain linear Gaussian: $$ -c_{t+1} - c_t = D\,x_t + G\,(\tilde\varepsilon_{t+1} - w_t), \qquad x_{t+1} = A\,x_t + C\,(\tilde\varepsilon_{t+1} - w_t) +c_{t+1} - c_t = D x_t + G (\tilde\varepsilon_{t+1} - w_t), \qquad x_{t+1} = A x_t + C (\tilde\varepsilon_{t+1} - w_t) $$ -The worst-case shock mean distortion is now *state-dependent*: +Because the state vector now includes a leading constant $1$, we can write the worst-case distortion as a *linear* function of the augmented state: $$ -\tilde{w}_t = \tilde{w}\,x_t +\tilde{w}_t = \tilde{W} x_t $$ -and the worst-case model is $(\tilde{A}, C, \tilde{D}, G)$ with +The first column of $\tilde{W}$ stores the constant part that would otherwise be written separately as $a$, while the remaining columns load on the stochastic factors $\check{x}_t$. + +When $\Xi = 0$ (no tilting), that first column reduces to Hansen's constant $\bar{w}$ from the untilted problem, while the remaining columns are zero. + +When $\Xi \neq 0$, the nonconstant columns of $\tilde{W}$ are the new contribution of the tilted entropy ball, and are what generate countercyclical uncertainty prices. + +Writing $\tilde{A} = A - C \tilde{W}$ and $\tilde{D} = D - G \tilde{W}$, the worst-case dynamics are $$ -\tilde{A} = A - C\,\tilde{w}, \qquad \tilde{D} = D - G\,\tilde{w} +x_{t+1} = \tilde{A} x_t + C\tilde\varepsilon_{t+1}, \qquad c_{t+1} - c_t = \tilde{D} x_t + G\tilde\varepsilon_{t+1} $$ ### Implementation: tilted entropy ball +For the inner minimisation over $\{w_t\}$ in {eq}`eq_szoke_seq`, the value function is **affine-quadratic** in the augmented state because $c_t$ enters linearly: + +$$ +J(x, c) = \frac{c}{1-\beta} + v^\top x + x^\top P x + K +$$ + +Writing $e_1 = (1, 0, \ldots, 0)^\top$ for the selector of the constant state and $\tilde\theta$ as $\theta$ in the code, the first-order condition for $\tilde{W}$ balances the entropy penalty against the marginal effects on the value function: + +$$ +(\theta I + 2\beta C^\top P C) \tilde{W} += 2\beta C^\top P A ++ \left(\frac{\beta}{1-\beta} G^\top + \beta C^\top v\right) e_1^\top +$$ + +The linear coefficient $v$ captures the discounted cumulative effect of a unit change in $x_t$ on future consumption, and satisfies: + +$$ +\bigl(I - \beta (A - C\tilde{W})^\top\bigr) v += \frac{\beta}{1-\beta} \left(D^\top - \tilde{W}^\top G^\top\right) +$$ + +Finally, matching quadratic terms in $x$ yields the matrix Riccati equation for $P$, which encodes the curvature of the value function: + +$$ +P = -\tfrac{\theta}{2} \Xi + \tfrac{\theta}{2} \tilde{W}^\top \tilde{W} + \beta (A - C\tilde{W})^\top P (A - C\tilde{W}) +$$ + +The code below iterates on the coupled $(P, v, \tilde{W})$ system to convergence. + +For later comparisons, we also keep a version of $\tilde{W}$ with its first column set to zero, denoted informally by $\tilde{W}^{sd}$, which isolates the factor-dependent component. + ```{code-cell} ipython3 class TiltedEntropyModel: """ - Hansen–Szőke tilted entropy ball model. + Hansen-Szőke tilted entropy ball model. + + Given (A, C, D, G, β, θ, Ξ), computes the full worst-case + distortion matrix W_tilde in w_t = W_tilde @ x_t. - Given (A, C, D, G, β, θ, Ξ), computes the worst-case - state-dependent distortion w_tilde_t = W_tilde x_t. + The first column of W_tilde is the constant component induced by + the augmented state x_t = [1, check_x_t']'. W_tilde_state zeros + that column out and keeps only factor-dependent loadings. """ def __init__(self, A, C, D, G, β, θ, Ξ): @@ -895,36 +1283,69 @@ class TiltedEntropyModel: self.Ξ = np.atleast_2d(Ξ).astype(float) self.n = self.A.shape[0] - self.w_tilde = self._solve_worst_case() - self.A_tilde = self.A - self.C @ self.w_tilde - self.D_tilde = self.D - self.G @ self.w_tilde + self.W_tilde, self.v = self._solve_worst_case() + self.A_tilde = self.A - self.C @ self.W_tilde + self.D_tilde = self.D - self.G @ self.W_tilde + self.W_tilde_state = self.W_tilde.copy() + self.W_tilde_state[:, 0] = 0.0 + self.A_tilde_state = self.A - self.C @ self.W_tilde_state + self.D_tilde_state = self.D - self.G @ self.W_tilde_state def _solve_worst_case(self): - """Iterate on (P, W) system to find worst-case W_tilde.""" + """Iterate on the coupled (P, v, W) system.""" n, k = self.n, self.C.shape[1] β, θ = self.β, self.θ P = np.zeros((n, n)) - for _ in range(2000): + v = np.zeros(n) + e1 = np.zeros(n) + e1[0] = 1.0 + converged = False + for _ in range(10000): M = θ * np.eye(k) + 2 * β * self.C.T @ P @ self.C - W = np.linalg.solve(M, 2 * β * self.C.T @ P @ self.A) + b = β / (1 - β) * self.G.T.flatten() + β * self.C.T @ v + rhs = 2 * β * self.C.T @ P @ self.A + np.outer(b, e1) + W = np.linalg.solve(M, rhs) A_w = self.A - self.C @ W P_new = (-(θ / 2) * self.Ξ + (θ / 2) * W.T @ W + β * A_w.T @ P @ A_w) P_new = 0.5 * (P_new + P_new.T) - if np.max(np.abs(P_new - P)) < 1e-12: + D_flat = self.D.T.flatten() + G_flat = self.G.T.flatten() + rhs_v = β * (D_flat - W.T @ G_flat) / (1 - β) + v_new = np.linalg.solve(np.eye(n) - β * A_w.T, rhs_v) + if (np.max(np.abs(P_new - P)) < 1e-10 + and np.max(np.abs(v_new - v)) < 1e-10): + P = P_new + v = v_new + converged = True break P = P_new + v = v_new + if not converged: + print("Warning: (P, v, W) iteration did not converge") self._P_quad = P - return W + self._v_lin = v + return W, v - def worst_case_distortion(self, x): - return self.w_tilde @ x + def distortion(self, x): + """Full worst-case distortion W_tilde @ x.""" + return self.W_tilde @ x - def conditional_entropy(self, x): - w = self.worst_case_distortion(x) + def state_dependent_distortion(self, x): + """Factor-dependent component with the constant column removed.""" + return self.W_tilde_state @ x + + def entropy(self, x): + """Full conditional entropy: (1/2)(W_tilde x)'(W_tilde x).""" + w = self.distortion(x) + return 0.5 * w @ w + + def state_dependent_entropy(self, x): + """Entropy of the factor-dependent component only.""" + w = self.state_dependent_distortion(x) return 0.5 * w @ w def xi_function(self, x): @@ -932,61 +1353,200 @@ class TiltedEntropyModel: ``` ```{code-cell} ipython3 -# Feared parametric model: more persistent dynamics -A_bar = np.array([[0.995, -0.03], - [0.000, 0.96]]) +# Feared parametric model +A_bar_core = np.array([[0.995, -0.03], + [0.000, 0.96]]) -w_bar = -inv(C) @ (A_bar - A) -Ξ = w_bar.T @ w_bar +A_bar, _, _, _, _ = augment_state_space( + A_bar_core, C_core, np.zeros((1, 2)), np.zeros((1, 2)), np.zeros(2) +) + +W_bar = -np.linalg.solve(C[1:, :], A_bar[1:, :] - A[1:, :]) +Ξ = W_bar.T @ W_bar print("Feared transition A_bar:\n", A_bar) -print("\nImplied distortion w_bar:\n", w_bar.round(3)) +print("\nImplied distortion W_bar:\n", W_bar.round(3)) print("\nTilting matrix Ξ:\n", Ξ.round(1)) ``` +In {eq}`eq_szoke_seq` the multiplier $\tilde\theta$ is determined by the outer maximisation. + +Here we fix $\theta$ at a representative value and solve only the inner minimisation, illustrating the multiplier formulation described in {ref}`the multiplier preferences section `. + ```{code-cell} ipython3 θ_tilt = 3.0 tilted = TiltedEntropyModel(A, C, D, G, β, θ_tilt, Ξ) -print("Worst-case distortion W_tilde:\n", tilted.w_tilde.round(4)) -print("\nWorst-case transition A_tilde:\n", tilted.A_tilde.round(4)) -print(f"\nEigenvalues of A: {eigvals(A).round(4)}") -print(f"Eigenvalues of A_tilde: {eigvals(tilted.A_tilde).round(4)}") +print("Worst-case distortion W_tilde:\n", tilted.W_tilde.round(4)) +print("\nConstant column of W_tilde:\n", tilted.W_tilde[:, 0].round(4)) +W_fd = tilted.W_tilde[:, 1:].round(4) +print("\nFactor-dependent columns of W_tilde:\n", W_fd) +print("\nWorst-case transition A_tilde:\n", + tilted.A_tilde.round(4)) +eig_A = eigvals(A[1:, 1:]).round(4) +eig_At = eigvals(tilted.A_tilde[1:, 1:]).round(4) +print(f"\nEigenvalues of check(A): {eig_A}") +print(f"Eigenvalues of check(A_tilde): {eig_At}") ``` +````{exercise} +:label: lr_exercise_3 + +Derive the first-order condition for the tilted entropy problem under the augmented-state convention. + +1. Start from {eq}`eq_szoke_seq` and write $w_t = W x_t$, where the first column of $W$ captures the constant part of the distortion. +2. Show that the first-order condition gives + + $$ + (\theta I + 2\beta C^\top P C) W + = 2\beta C^\top P A + + \left(\frac{\beta}{1-\beta} G^\top + \beta C^\top v\right)e_1^\top + $$ + + and derive the associated linear equation for $v$. +3. Derive the $P$ update by substituting the optimal $W$ back into the Bellman equation and matching quadratic terms in $x$. + +```` + +````{solution} lr_exercise_3 +:class: dropdown + +For part 1, write $w_t = W x_t$ with $x_t = (1, \check{x}_t^\top)^\top$. + +To confirm the affine-quadratic form, substitute this guess into the Bellman equation for the inner minimisation of {eq}`eq_szoke_seq`: + +$$ +J(x, c) = \min_{w} \left\{ c + \frac{\theta}{2}(w^\top w - x^\top \Xi x) + \beta\, E\bigl[J(x', c')\bigr] \right\} +$$ + +where $x' = Ax + C(\tilde\varepsilon - w)$ and $c' - c = Dx + G(\tilde\varepsilon - w)$. + +Conjecture $J(x,c) = c/(1-\beta) + v^\top x + x^\top P x + K$. + +Under this guess, $J(x',c') = c'/(1-\beta) + v^\top x' + x'^\top P x' + K$. + +Write $c'/(1-\beta) = c/(1-\beta) + (c'-c)/(1-\beta)$, so the $c/(1-\beta)$ term passes through both sides and can be cancelled. + +Substituting $w = Wx$, the next-period state is $x' = (A - CW)x + C\tilde\varepsilon$, and the consumption increment is $(c'-c) = (D - GW)x + G\tilde\varepsilon$. + +Taking $E[\cdot]$ (with $E[\tilde\varepsilon] = 0$, $E[\tilde\varepsilon\tilde\varepsilon^\top] = I$), the right-hand side after cancelling $c/(1-\beta)$ has the following structure. + +*Quadratic terms in $x$:* + +$$ +-\tfrac{\theta}{2} x^\top \Xi x + \tfrac{\theta}{2} x^\top W^\top W x + \beta x^\top (A-CW)^\top P (A-CW) x +$$ + +These come from the penalty $\frac{\theta}{2}(w^\top w - x^\top \Xi x)$ and from $x'^\top P x'$. + +*Linear terms in $x$:* + +$$ +\tfrac{\beta}{1-\beta}(D - GW)x + \beta v^\top (A-CW)x +$$ + +These come from $(c'-c)/(1-\beta)$ and from $v^\top x'$. + +The remaining terms are constant (independent of $x$). + +These come from the noise terms and from $K$. + +Every term is at most quadratic in $x$, so matching coefficients reproduces the conjectured form $v^\top x + x^\top P x + K$ with updated $v$, $P$, $K$. + +This confirms self-consistency of the affine-quadratic guess. + +To derive the first-order condition, collect all terms in the Bellman RHS that depend on $w = Wx$. + +From the penalty $\frac{\theta}{2} w^\top w$, the contribution is $\frac{\theta}{2}x^\top W^\top W x$. + +From $\beta E[v^\top x']$ with $E[x'] = (A-CW)x$, the $w$-dependent part is $-\beta v^\top C W x$. + +From $\beta E[(c'-c)/(1-\beta)]$ with $E[c'-c] = (D-GW)x$, the $w$-dependent part is $-\frac{\beta}{1-\beta} G W x$. + +From $\beta E[x'^\top P x']$ with $E[x'] = (A-CW)x$, the $w$-dependent part is $\beta x^\top (A-CW)^\top P (A-CW) x$. + +Differentiating with respect to $W$ and using $e_1^\top x_t = 1$ gives: + +$$ +(\theta I + 2\beta C^\top P C) W += 2\beta C^\top P A ++ \left(\frac{\beta}{1-\beta} G^\top + \beta C^\top v\right)e_1^\top +$$ + +This shows directly how the first column of $W$ carries the constant part of the distortion. + +$$ +\bigl(I - \beta (A - CW)^\top\bigr) v += \frac{\beta}{1-\beta} \left(D^\top - W^\top G^\top\right) +$$ + +This is the linear equation used in the code to update $v$ once $W$ is known. + +For part 3, substitute the optimal $W$ back into the Bellman equation. + +The quadratic terms in $x_t$ give: + +$$ +P = -\tfrac{\theta}{2} \Xi + \tfrac{\theta}{2} W^\top W + \beta (A-CW)^\top P(A-CW) +$$ + +This is the matrix Riccati equation that the code iterates to convergence. + +```` + ### State-dependent entropy: the key innovation +The following figure compares the conditional entropy of the worst-case distortion across three models as a function of the level factor $\check{x}_{1,t}$, revealing how the tilted entropy ball produces the state dependence that Hansen's original formulation lacks. + ```{code-cell} ipython3 x_grid = np.linspace(-0.03, 0.04, 200) -entropy_tilted = np.array([tilted.conditional_entropy(np.array([x, 0.005])) - for x in x_grid]) -ξ_vals = np.array([tilted.xi_function(np.array([x, 0.005])) - for x in x_grid]) +entropy_tilted = np.array([ + tilted.state_dependent_entropy( + augment_state(np.array([x, 0.005]))) + for x in x_grid]) +ξ_vals = np.array([ + tilted.xi_function( + augment_state(np.array([x, 0.005]))) + for x in x_grid]) + +# Calibrate Hansen's θ so constant entropy matches E[ξ(x_t)/2] +Σ_check = solve_discrete_lyapunov(A[1:, 1:], C[1:, :] @ C[1:, :].T) +E_xx = np.block([ + [np.ones((1, 1)), np.zeros((1, 2))], + [np.zeros((2, 1)), Σ_check] +]) +avg_ξ_half = 0.5 * np.trace(Ξ @ E_xx) +w_unit = hansen_worst_case(A, C, D, G, β, 1.0) +θ_hansen = norm(w_unit) / np.sqrt(2 * avg_ξ_half) +w_hansen = w_unit / θ_hansen +hansen_ent = 0.5 * w_hansen @ w_hansen fig, ax = plt.subplots(figsize=(9, 5)) -ax.axhline(0, color='steelblue', lw=2, ls='--', - label=r"Hansen: constant $\bar{w}$") -ax.plot(x_grid, entropy_tilted, 'firebrick', lw=2, - label=r"Szőke: $\frac{1}{2}\tilde{w}_t'\tilde{w}_t$") -ax.plot(x_grid, 0.5 * ξ_vals, 'seagreen', lw=1.5, ls=':', +hansen_lab = (rf"Hansen: constant " + rf"$\frac{{1}}{{2}}\bar{{w}}^\top" + rf"\bar{{w}} = {hansen_ent:.4f}$") +ax.axhline(hansen_ent, color='steelblue', + lw=2, ls='--', label=hansen_lab) +szoke_lab = (r"Sz\H{o}ke (factor-dep.): " + r"$\frac{1}{2}(\tilde{W}^{sd}x_t)" + r"^\top(\tilde{W}^{sd}x_t)$") +ax.plot(x_grid, entropy_tilted, 'firebrick', + lw=2, label=szoke_lab) +ax.plot(x_grid, 0.5 * ξ_vals, 'seagreen', lw=2, ls=':', label=r"Feared model: $\frac{1}{2}\xi(x_t)$") -ax.set_xlabel(r"Level factor $x_{1,t}$") -ax.set_ylabel("State-dependent conditional entropy") -ax.set_title("State-dependent vs. constant worst-case distortions") +ax.set_xlabel(r"Level factor $\check{x}_{1,t}$") +ax.set_ylabel("Conditional entropy") ax.legend() plt.tight_layout() plt.show() ``` -The key innovation of the tilted entropy ball is visible: the Szőke worst-case distortion $\tilde{w}_t = \tilde{W}\,x_t$ grows with $|x_t|$, producing *countercyclical uncertainty prices*. - +The key innovation of the tilted entropy ball is visible: the factor-dependent component $\tilde{W}^{sd} x_t$ of the worst-case distortion grows with $|\check{x}_t|$, producing *countercyclical uncertainty prices*. -When the state is far from its mean, the agent's worst-case model deviates more from the econometrician's model. +By contrast, Hansen's constant distortion $\bar{w}$ has entropy $\frac{1}{2}\bar{w}^\top\bar{w}$ that does not vary with the state (shown as a horizontal line). -By contrast, Hansen's constant distortion $\bar{w}$ contributes nothing state-dependent. - -The Szőke parabola lies inside the feared model's entropy budget $\frac{1}{2}\xi(x_t)$, confirming the worst-case distortion respects the tilted entropy constraint. +The Szőke parabola lies inside the feared model's entropy budget $\frac{1}{2}\xi(x_t)$ along this slice, consistent with the tilted entropy constraint {eq}`eq_tilted_constraint`. ### Three probability twisters @@ -994,15 +1554,15 @@ To summarize, three distinct probability twisters play roles in this analysis: | Symbol | Source | Describes | |:---------------|:------------------------------|:----------------------------------| -| $w_t^*$ | Piazzesi, Salomao, Schneider | Mistaken agent's beliefs | +| $w_t^*$ | Piazzesi, Salomão, Schneider | Mistaken agent's beliefs | | $\bar{w}_t$ | Szőke's feared parametric model | Especial LRR parametric worry | -| $\tilde{w}_t$ | Szőke's worst-case model | Worst-case distortion | +| $\tilde{W} x_t$ | Szőke's worst-case model | State-dependent component of worst-case distortion | ```{code-cell} ipython3 -x_state = np.array([0.02, 0.008]) -w_pss = w_star @ x_state -w_feared = w_bar @ x_state -w_szoke = tilted.worst_case_distortion(x_state) +x_state = augment_state(np.array([0.02, 0.008])) +w_pss = W_star @ x_state +w_feared = W_bar @ x_state +w_szoke = tilted.state_dependent_distortion(x_state) ε_grid = np.linspace(-4, 4, 500) ϕ_base = normal_dist.pdf(ε_grid, 0, 1) @@ -1014,24 +1574,87 @@ ax.plot(ε_grid, ϕ_base, 'black', lw=2, for w_val, label, color, ls in [ (w_pss[0], r"PSS mistaken $w^*_t$", 'steelblue', '-'), (w_feared[0], r"Feared LRR $\bar{w}_t$", 'seagreen', '--'), - (w_szoke[0], r"Szőke worst-case $\tilde{w}_t$", 'firebrick', '-'), + (w_szoke[0], + r"Sz\H{o}ke worst-case $\tilde{W}^{sd}x_t$" + r" (factor-dep.)", 'firebrick', '-'), ]: ax.plot(ε_grid, normal_dist.pdf(ε_grid, -w_val, 1), color=color, lw=2, ls=ls, label=label) ax.set_xlabel(r"$\varepsilon_1$") ax.set_ylabel("Density") -ax.set_title("Three probability twisters (first shock component)") ax.legend() plt.tight_layout() plt.show() ``` +Each twister shifts the econometrician's $\mathcal{N}(0,1)$ density by the displayed component, where the direction and magnitude depend on the current state $x_t$. + +For the state shown here, all three displayed components are negative in their first element, so the twisted densities are shifted slightly to the right. + +The shifts are small relative to the unit variance because the stochastic state $\check{x}_t = (0.02, 0.008)$ is close to the unconditional mean. ## Empirical challenges and model performances -```{figure} /_static/lecture_specific/risk_aversion_or_mistaken_beliefs/fig1_tom.png -U.S. term structure of interest rates. +Before comparing models, it helps to see the empirical regularities that any successful theory must explain. + +```{code-cell} ipython3 +--- +tags: [hide-input] +mystnb: + figure: + caption: U.S. Treasury yields and yield spread + name: fig-us-yields +--- +data = pd.read_csv( + 'https://raw.githubusercontent.com/QuantEcon/lecture-python.myst/update-asset/lectures/' + '_static/lecture_specific/risk_aversion_or_mistaken_beliefs/fred_data.csv', + parse_dates=['DATE'], index_col='DATE' +) + +fig, axes = plt.subplots(2, 1, figsize=(12, 8), sharex=True, + gridspec_kw={'height_ratios': [2, 1]}) + +# Recession shading helper +def shade_recessions(ax, rec): + ax.fill_between(rec.index, 0, 1, + where=rec.values.flatten() == 1, + transform=ax.get_xaxis_transform(), + color='grey', alpha=0.2) + +rec = data['USREC'].dropna() + +ax = axes[0] +shade_recessions(ax, rec) + +ax.plot(data['GS1'], 'steelblue', lw=2, + label=r'$y_{\mathrm{nom}}^{(1)}$') +ax.plot(data['GS5'], 'seagreen', lw=2, + label=r'$y_{\mathrm{nom}}^{(5)}$') +ax.plot(data['GS10'], 'firebrick', lw=2, + label=r'$y_{\mathrm{nom}}^{(10)}$') +ax.plot(data['DFII5'], 'seagreen', lw=2, ls='--', + label=r'$y_{\mathrm{real}}^{(5)}$') +ax.plot(data['DFII10'], 'firebrick', lw=2, ls='--', + label=r'$y_{\mathrm{real}}^{(10)}$') + +ax.axhline(0, color='black', lw=0.5) +ax.set_ylabel('Yield (%)') +ax.legend(loc='upper right') + +ax2 = axes[1] +shade_recessions(ax2, rec) + +spread_10_1 = data['GS10'] - data['GS1'] +ax2.plot(spread_10_1, 'steelblue', lw=2, + label=r'$y^{(10)} - y^{(1)}$') +ax2.axhline(0, color='black', lw=0.5) +ax2.set_ylabel('Spread (%)') +ax2.set_xlabel('Year') +ax2.legend(loc='upper left') + +plt.tight_layout() +plt.show() ``` Several recognised patterns characterise the U.S. term structure: @@ -1039,8 +1662,7 @@ Several recognised patterns characterise the U.S. term structure: - The nominal yield curve usually slopes *upward*. - The long-minus-short yield spread *narrows before* U.S. recessions and *widens after* them. -- Consequently, the slope of the yield curve helps *predict* aggregate inputs - and outputs. +- Consequently, the slope of the yield curve helps *predict* recessions and economic activity. - Long and short yields are *almost equally volatile* (the Shiller "volatility puzzle"). - To solve the Shiller puzzle, risk prices (or something observationally equivalent) must *depend on volatile state variables*. @@ -1050,7 +1672,7 @@ The following table summarises how various models perform: | Model | Average slope | Slopes near recessions | Volatile long yield | |:-------------------------------|:--------------|:-----------------------|:--------------------| | {cite:t}`Lucas1978` | no | no | no | -| Epstein–Zin with LRR | maybe | yes | no | +| Epstein-Zin with LRR | maybe | yes | no | | {cite:t}`piazzesi2015trend` | built-in | built-in | yes | | {cite:t}`szoke2022estimating` | *YES* | yes | yes | @@ -1058,7 +1680,7 @@ The following table summarises how various models perform: Szőke's framework delivers: -1. A theory of *state-dependent belief distortions* $\tilde{w}_t = \tilde{w}\,x_t$. +1. A theory of *state-dependent belief distortions* with factor-dependent component $\tilde{W}^{sd} x_t$. 2. A theory about the *question that professional forecasters answer*: they respond with their worst-case model because they hear "tell me forecasts that rationalise your (max-min) decisions." @@ -1067,40 +1689,38 @@ Szőke's framework delivers: ```{code-cell} ipython3 model_rn = LikelihoodRatioModel( - A, C, D, G, r_bar, Λ=np.zeros((2, 2)), δ_0=δ_0) + A, C, D, G, r_bar, Λ=np.zeros_like(Λ)) model_uncert = LikelihoodRatioModel( - A, C, D, G, r_bar, Λ=tilted.w_tilde, δ_0=δ_0) + A, C, D, G, r_bar, Λ=tilted.W_tilde_state) -x_test = np.array([0.01, 0.005]) +x_test = augment_state(np.array([0.01, -0.03])) n_max = 120 mats = np.arange(1, n_max + 1) fig, ax = plt.subplots(figsize=(9, 5)) ax.plot(mats, model_rn.yields(x_test, n_max) * 1200, - 'grey', lw=1.5, ls=':', label='Risk neutral') + 'grey', lw=2, ls=':', label='Risk neutral') ax.plot(mats, model.yields(x_test, n_max) * 1200, - 'steelblue', lw=2, label=r'Risk aversion ($\Lambda x_t$)') + 'steelblue', lw=2, label=r'Risk aversion ($\lambda x_t$)') ax.plot(mats, model_uncert.yields(x_test, n_max) * 1200, 'firebrick', lw=2, ls='--', - label=r'Model uncertainty ($\tilde{W} x_t$)') + label=r'Model uncertainty ($\tilde{W}^{sd} x_t$)') ax.set_xlabel("Maturity (months)") ax.set_ylabel("Yield (annualised %)") -ax.set_title("Yield curves: alternative sources of term premia") ax.legend() plt.tight_layout() plt.show() ``` -The risk-aversion-only and model-uncertainty-only yield curves both slope upward, generating a term premium. +The risk-aversion-only and model-uncertainty-only yield curves both slope upward, generating a term premium. -The two explanations represent *alternative channels* for the same observed term premium — reinforcing the identification challenge explored throughout this lecture. +(Note that the model-uncertainty curve uses only the factor-dependent component $\tilde{W}^{sd} x_t$, not the full worst-case distortion.) +The two explanations represent *alternative channels* for the same observed term premium, reinforcing the identification challenge explored throughout this lecture. ## Cross-equation restrictions and estimation -A key appeal of the robust control approach is that it lets us deviate from -rational expectations while still preserving a set of powerful **cross-equation -restrictions** on decision makers' beliefs. +A key appeal of the robust control approach is that it lets us deviate from rational expectations while still preserving a set of powerful **cross-equation restrictions** on decision makers' beliefs. As {cite:t}`szoke2022estimating` puts it: @@ -1114,170 +1734,98 @@ As {cite:t}`szoke2022estimating` puts it: ### Szőke's empirical strategy -**Stage I: Estimation** +In the Szőke framework, the rational-expectations econometrician's risk price vector $\lambda_t$ is decomposed as $\lambda_t = \tilde{w}_t + \tilde{\lambda}_t$, paralleling the PSS decomposition $\lambda = \lambda^* + W^*$. -1. Use $\{x_t, c_t\}_{t=0}^T$ to estimate the econometrician's $A$, $C$, $D$, $G$. -2. View $\Xi$ as a matrix of additional free parameters and estimate them - simultaneously with risk prices $\tilde\lambda\,x_t$ from data - $\{p_t(n+1)\}_{n=1}^N$, $t = 0, \ldots, T$, by imposing cross-equation - restrictions: +The combined likelihood ratio retains the same log-normal form as before, but now the total distortion vector $\lambda_t$ has an explicit decomposition into belief distortion and risk price components: $$ -p_t(n+1) = \exp(-r_t)\,E_t\!\left[m_{t+1}^{\tilde{w}}\,m_{t+1}^{\tilde\lambda}\,p_{t+1}(n)\right] +m_{t+1}^\lambda = \exp \left(-\lambda_t^\top\varepsilon_{t+1} - \frac{1}{2}\lambda_t^\top\lambda_t\right), \qquad \lambda_t = \tilde{w}_t + \tilde\lambda_t $$ -where +Here $\tilde{w}_t = \tilde{W} x_t$ is the worst-case belief distortion, whose factor-dependent component is carried by the non-first columns of $\tilde{W}$, and $\tilde\lambda_t = \tilde\lambda x_t$ is the residual risk price. + +In stage I (estimation): + +1. Use $\{x_t, c_t\}_{t=0}^T$ to estimate the econometrician's $A$, $C$, $D$, $G$. +2. View $\Xi$ as a matrix of additional free parameters and estimate them + simultaneously with risk prices $\tilde\lambda x_t$ from data + $\{p_t(n+1)\}_{n=1}^N$, $t = 0, \ldots, T$, by imposing cross-equation + restrictions: $$ -m_{t+1}^{\tilde{w}} = \exp\!\left(-\tilde{w}_t'\varepsilon_{t+1} - \frac{\tilde{w}_t'\tilde{w}_t}{2}\right), \qquad m_{t+1}^{\tilde\lambda} = \exp\!\left(-\tilde\lambda_t'\varepsilon_{t+1} - \frac{\tilde\lambda_t'\tilde\lambda_t}{2}\right) +p_t(n+1) = \exp(-r_t) E_t \left[m_{t+1}^\lambda p_{t+1}(n)\right] $$ -**Stage II: Assessment** +In stage II (assessment): 1. Assess improvements in predicted behaviour of the term structure. 2. Use estimated worst-case dynamics to form distorted forecasts - $\tilde{x}_{t+1} = (A - C\tilde{w})x_t$ and compare them to those of + $\tilde{E}_t[x_{t+1}] = (A - C\tilde{W})x_t$ and compare them to those of professional forecasters. -3. Compute discounted relative entropy of the worst-case twisted model - relative to the econometrician's model to assess how difficult it is - to distinguish the two models statistically. +3. Compute the discounted KL divergence $\frac{1}{2}E^w[\sum \beta^t w_t^\top w_t]$ of + each twisted model relative to the econometrician's model and compare them + (the code below zeros the first column of $W$ and keeps only the factor-dependent part). ```{code-cell} ipython3 -def discounted_entropy(W, A_w, C, x0, β, T_horizon=500): - """Approximate (1/2) E^w [Σ β^t w_t'w_t] by simulation.""" +def discounted_kl(W, A_w, C, x0, β, T_horizon=500): + """Factor-dependent KL: (1/2) E^w [Σ β^t (W x_t)'(W x_t)].""" n_sims = 10_000 + k = C.shape[1] rng = np.random.default_rng(2024) X = np.tile(x0, (n_sims, 1)) total = np.zeros(n_sims) for t in range(T_horizon): w_t = X @ W.T total += β**t * 0.5 * np.sum(w_t**2, axis=1) - X = X @ A_w.T + rng.standard_normal((n_sims, len(x0))) @ C.T + X = X @ A_w.T + rng.standard_normal((n_sims, k)) @ C.T return np.mean(total) -x0_test = np.array([0.01, 0.005]) -ent_szoke = discounted_entropy(tilted.w_tilde, tilted.A_tilde, C, x0_test, β) -ent_feared = discounted_entropy(w_bar, A_bar, C, x0_test, β) +x0_test = augment_state(np.array([0.01, 0.005])) +kl_szoke = discounted_kl( + tilted.W_tilde_state, + tilted.A_tilde_state, C, x0_test, β) +kl_feared = discounted_kl(W_bar, A_bar, C, x0_test, β) -print(f"Szőke worst-case entropy: {ent_szoke:.4f}") -print(f"Feared LRR entropy: {ent_feared:.4f}") -status = ('closer to' if ent_szoke < ent_feared +print(f"Szőke factor-dep. KL: {kl_szoke:.4f}") +print(f"Feared LRR KL: {kl_feared:.4f}") +status = ('closer to' if kl_szoke < kl_feared else 'farther from') print(f"\nWorst-case model is {status} " f"the econometrician's model.") ``` -## Multiplier preferences - -The **multiplier preference** version of the dubious agent's problem is: - -```{math} -:label: eq_mult_seq - -W(x_0, c_0 \mid \theta) := \min_{\{m_{t+1}\}} E\!\left[\sum_{t=0}^{\infty} \beta^t\,M_t\bigl(c_t + \theta\,m_{t+1}\log m_{t+1}\bigr) \;\middle|\; x_0, c_0\right] -``` - -with $M_{t+1} = M_t\,m_{t+1}$, $E[m_{t+1} \mid x_t, c_t] = 1$, $M_0 = 1$. - -The recursive formulation is: - -$$ -W(x_t, c_t \mid \theta) = c_t + \min_{m_{t+1}} E\!\left[m_{t+1}\bigl[\beta W(x_{t+1}, c_{t+1}) + \theta\log m_{t+1}\bigr] \;\middle|\; x_t, c_t\right] -$$ - -$$ -= c_t - \theta\log E\!\left[\exp\!\left(-\frac{\beta W(x_{t+1}, c_{t+1})}{\theta}\right) \;\middle|\; x_t, c_t\right] -$$ - -$$ -=: c_t + T_t\!\left[\beta W(x_{t+1}, c_{t+1})\right] -$$ - -where the right-hand side is attained by - -$$ -m_{t+1}^* \propto \exp\!\left(-\frac{W(x_{t+1}, c_{t+1})}{\theta}\right) -$$ - -**Relationship between multiplier and constraint problems.** By Lagrange -multiplier theory, - -$$ -W(x_t, c_t \mid \tilde\theta) = J(x_t, c_t \mid \eta) + \tilde\theta\,\eta -$$ - -```{code-cell} ipython3 -def T_operator(V, θ, probs=None): - """Risk-sensitivity operator: T[V] = -θ log E[exp(-V/θ)].""" - if probs is None: - probs = np.ones(len(V)) / len(V) - V_s = V / θ - max_v = np.max(V_s) - return -θ * (max_v + np.log(np.sum(probs * np.exp(V_s - max_v)))) - -rng = np.random.default_rng(42) -V_samples = rng.normal(loc=5.0, scale=1.0, size=10_000) -E_V = np.mean(V_samples) - -θ_grid = np.logspace(-1, 3, 50) -T_vals = [T_operator(V_samples, θ) for θ in θ_grid] - -fig, ax = plt.subplots(figsize=(8, 5)) -ax.semilogx(θ_grid, T_vals, 'firebrick', lw=2, label=r"$T_\theta[V]$") -ax.axhline(E_V, color='steelblue', lw=1.5, - ls='--', label=r"$E[V]$ (risk neutral)") -ax.set_xlabel(r"Robustness parameter $\theta$") -ax.set_ylabel("Value") -ax.set_title(r"Risk-sensitivity operator $T_\theta$") -ax.legend() -ax.annotate(r"$\theta \to \infty$: risk neutral", - xy=(500, E_V), fontsize=11, color='steelblue', - xytext=(50, E_V - 0.8), - arrowprops=dict(arrowstyle='->', color='steelblue')) -ax.annotate(r"Small $\theta$: very robust", - xy=(0.15, T_vals[1]), fontsize=11, color='firebrick', - xytext=(0.5, T_vals[1] - 0.5), - arrowprops=dict(arrowstyle='->', color='firebrick')) -plt.tight_layout() -plt.show() -``` - -As $\theta \to \infty$, the risk-sensitivity operator converges to the ordinary expectation $E[V]$ — the agent becomes risk neutral. - -As $\theta$ shrinks, the operator places more weight on bad outcomes, reflecting greater concern about model misspecification. +Using only the factor-dependent component $\tilde{W}^{sd} x_t$, the Szőke worst-case model has lower discounted KL divergence from the econometrician's model than the feared long-run risk model, meaning it is statistically harder to distinguish from the baseline. +Yet it still generates the state-dependent uncertainty prices needed to match term-structure dynamics. ## Who cares? -Joint probability distributions of interest rates and macroeconomic shocks are -important throughout macroeconomics: +Joint probability distributions of interest rates and macroeconomic shocks are important throughout macroeconomics: -- **Costs of aggregate fluctuations.** Welfare assessments of business cycles +- *Costs of aggregate fluctuations.* Welfare assessments of business cycles depend sensitively on how risks are priced. -- **Consumption Euler equations.** The "New Keynesian IS curve" is a log-linearised +- *Consumption Euler equations.* The "New Keynesian IS curve" is a log-linearised consumption Euler equation whose risk adjustments are controlled by the stochastic discount factor. -- **Optimal taxation and government debt management.** Government bond prices embed +- *Optimal taxation and government debt management.* Government bond prices embed risk prices whose state dependence matters for optimal fiscal policy. -- **Central bank expectations management.** Forward guidance works by shifting the +- *Central bank expectations management.* Forward guidance works by shifting the term structure, an exercise whose effects depend on the same likelihood ratios studied here. -- **Long-run risk and secular stagnation.** The Bansal–Yaron long-run risk +- *Long-run risk and secular stagnation.* The Bansal-Yaron long-run risk hypothesis is difficult to detect statistically, yet an agent who fears it in the sense formalised above may behave very differently than one who does not. -Understanding whether observed asset prices reflect risk aversion, mistaken -beliefs, or fears of model misspecification — and quantifying each component — -is interesting for both positive and normative macroeconomics. +Understanding whether observed asset prices reflect risk aversion, mistaken beliefs, or fears of model misspecification, and quantifying each component, is interesting for both positive and normative macroeconomics. ## Related lectures This lecture connects to several others in the series: -- {ref}`Doubts or Variability? ` studies how a preference for robustness generates worst-case likelihood ratios that look like stochastic discount factor shocks, complementing the analysis here with Hansen–Jagannathan bounds and detection-error probabilities. -- {ref}`Asset Pricing: Finite State Models ` introduces stochastic discount factors and risk-neutral pricing in a finite-state Markov setting — the discrete-state counterpart of the continuous Gaussian framework used here. +- {ref}`Doubts or Variability? ` studies how a preference for robustness generates worst-case likelihood ratios that look like stochastic discount factor shocks, complementing the analysis here with Hansen-Jagannathan bounds and detection-error probabilities. +- {ref}`Asset Pricing: Finite State Models ` introduces stochastic discount factors and risk-neutral pricing in a finite-state Markov setting, the discrete-state counterpart of the continuous Gaussian framework used here. - {ref}`Heterogeneous Beliefs and Bubbles ` examines how heterogeneous and possibly mistaken beliefs generate speculative asset price bubbles, providing another perspective on how beliefs affect asset prices. -- {ref}`Likelihood Ratio Processes ` develops the mathematical properties of likelihood ratios — the central device organising this lecture — including their martingale structure and statistical applications. -- {ref}`Divergence Measures ` covers Kullback–Leibler divergence and relative entropy in detail, providing the information-theoretic foundations for the entropy constraints used in the robust control sections. -- {ref}`Affine Models of Asset Prices ` extends the linear Gaussian state-space framework to affine and exponential-quadratic stochastic discount factors, developing risk-neutral pricing formulas closely related to those derived here. \ No newline at end of file +- {ref}`Likelihood Ratio Processes ` develops the mathematical properties of likelihood ratios, the central device organising this lecture, including their martingale structure and statistical applications. +- {ref}`Divergence Measures ` covers Kullback-Leibler divergence and relative entropy in detail, providing the information-theoretic foundations for the entropy constraints used in the robust control sections. +- {ref}`Affine Models of Asset Prices ` extends the linear Gaussian state-space framework to affine and exponential-quadratic stochastic discount factors, developing risk-neutral pricing formulas closely related to those derived here.