QuantEcon / lecture-python

Source files for https://python.quantecon.org
BSD 3-Clause "New" or "Revised" License
61 stars 21 forks source link

Error in Ex 1 solution in "Asset Pricing with Incomplete Markets" lecture #374

Closed jms202 closed 3 years ago

jms202 commented 3 years ago

Is there an error in the solution to Exercise 1 in the Asset Pricing with Incomplete Markets lecture?

When I run the code, the function price_optimistic_beliefs() is returning 2 x 2 matrices rather than a two-element vector. Here's the output I'm getting:

p_optimistic
====================
State 0: [1.37 1.58]
State 1: [1.25 1.96]
--------------------
p_hat_a
====================
State 0: [1.37 1.58]
State 1: [1.21 1.84]
--------------------
p_hat_b
====================
State 0: [1.36 1.53]
State 1: [1.25 1.96]
--------------------
jms202 commented 3 years ago

Sorry, my fault, there is no issue - I realised what the problem is.

jstac commented 3 years ago

@jms202 no problem, please let us know if you have other feedback.