Improved doc; raise exception when AdjustProb < 1
@@ -226,6 +226,9 @@ def _calcwFunc(AdjustPrb, AdjustCount, ShareNowCount, vFunc_adj, CRRA):
integrand : function (lambda)
Can be used to evaluate the integrand and the sent to a quadrature procedure.
'''
+ if AdjustPrb < 1:
+ raise Exception('The code allowing probabilities of adjustment less than 1 is not working yet; release notes will indicate when we have a release where it work')
+
# AdjustCount could in principle just be inferred from AdjustPrb instead of
# cartying it arround FIXME / TODO
wFunc = []
@@ -286,6 +289,28 @@ class PortfolioSolution(Solution):
def __init__(self, cFunc=None, vFunc=None, wFunc=None,
vPfunc=None, RiskyShareFunc=None, vPPfunc=None,
mNrmMin=None, hNrm=None, MPCmin=None, MPCmax=None):
+ """We implement three different ways to allow portfolio choice.
+ The agent can choose
+ * any portfolio share ('continuous choice')
+ * only a specified set of portfolio shares ('discrete choice')
+ * With probability 1 (agent always gets to choose)
+ * With probability 0 < p < 1 (stochastic chance to choose)
+
+ We allow two choices for the description of the
+ distribution of the stochastic variable:
+ 1. A generic discrete probability distribution
+ * Nodes and their probabilities are specified
+ 2. A true lognormal distribution
+ * The mean return and the standard deviation are specified
+
+ In the discrete portfolio shares case, the user also must
+ input a function that *draws* from the distribution in drawRiskyFunc
+
+ Other assumptions:
+ * distributions are time constant
+ * probability of being allowed to reoptimize is time constant
+ * If p < 1, you must specify the PortfolioSet discretely
+ """
# Change any missing function inputs to NullFunc
if cFunc is None:
cFunc = NullFunc()
