Refactoring thread

Fair warning: this code is not intended to run just yet. As I was refactoring the functions I realized I had questions for Dan and Co. and decided to put them up on github in order to avoid another long email thread. I'll try to tag people in specific comments to make those salient to relevant folks.

Also, I don't think we need _oldfei, that was about an ealier law, when 
the FEI really was an exclusion.

dan

On Thu, 4 Sep 2014, Ilia Kurenkov wrote:

> 
> In translation.py:
> 
> > +    # x02900 = c02900  # IK: for now leaving out
> > +
> > +    return cd
> > +
> > +
> > +def CapGains(cd):
> > +    #Capital Gains
> > + 
> > +    cd['c23650'] = puf_dict['c23250'] + puf_dict['e22250'] + puf_dict['e23660'] 
> > +    cd['c01000'] = np.maximum(-3000/ cd['sep'], cd['c23650'])
> > +    # feimax = maximum foreign earned income exclusion
> > +    # this variable is problematic: in the SAS code it's defined as an array
> > +    # that has 20 members, covering the period of 1993-2013
> > +    # In our current PlanX, however, it's just a one-member array, having
> > +    # only retained the last feimax value from before
> > +    mod_feimax = planX['feimax'][2013-puf_dict['FLPDYR']] * puf_dict['f2555']
> 
> @feenberg could you tell me more about the maximum foreign earned income variable
> and how we should be calculating it? I'm getting conflicting evidence from the SAS
> code and @SameerSarkar's python translation.
> 
> —
> Reply to this email directly or view it onGitHub.[8114261__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyNTUwNjcxOSwiZ
> GF0YSI6eyJpZCI6NDE2Mjg2NDl9fQ==--bebcc471bc030d3bfde235e293c88e4617fb302c.gif]
> 
> 
>