Package QSTK :: Package qstkstrat :: Module strategies
[hide private]
[frames] | no frames]

Module strategies

source code

Created on Sep 27, 2011


Author: John Cornwell

Contact: JohnWCornwellV@gmail.com

Functions [hide private]
 
stratGiven(dtStart, dtEnd, dFuncArgs)
@summary Simplest strategy, weights are provided through args.
source code
 
strat1OverN(dtStart, dtEnd, dFuncArgs)
@summary Evenly distributed strategy.
source code
 
stratMark(dtStart, dtEnd, dFuncArgs)
@summary Markovitz strategy, generates a curve and then chooses a point on it.
source code
 
stratMarkSharpe(dtStart, dtEnd, dFuncArgs)
@summary Calls stratMark with sharpe ratio point.
source code
 
stratMarkLowVar(dtStart, dtEnd, dFuncArgs)
@summary Calls stratMark and uses lowest variance ratio point.
source code
 
stratMarkMaxRet(dtStart, dtEnd, dFuncArgs)
@summary Calls stratMark and uses maximum returns.
source code
 
stratMarkMinRet(dtStart, dtEnd, dFuncArgs)
@summary Calls stratMark and uses minimum returns.
source code
 
stratMarkSharpeAlpha(dtStart, dtEnd, dFuncArgs)
@summary Calls stratMark and chooses the highest share point, uses future knowlege (alpha).
source code
 
stratMarkMaxRetAlpha(dtStart, dtEnd, dFuncArgs)
@summary Calls stratMark chooses the highest returns point, uses future knowlege (alpha).
source code
Variables [hide private]
  __package__ = 'QSTK.qstkstrat'
Function Details [hide private]

stratGiven(dtStart, dtEnd, dFuncArgs)

source code 

@summary Simplest strategy, weights are provided through args.

Parameters:
  • dtStart - Start date for portfolio
  • dtEnd - End date for portfolio
  • dFuncArgs - Dict of function args passed to the function @return DataFrame corresponding to the portfolio allocations

strat1OverN(dtStart, dtEnd, dFuncArgs)

source code 

@summary Evenly distributed strategy.

Parameters:
  • dtStart - Start date for portfolio
  • dtEnd - End date for portfolio
  • dFuncArgs - Dict of function args passed to the function @return DataFrame corresponding to the portfolio allocations

stratMark(dtStart, dtEnd, dFuncArgs)

source code 

@summary Markovitz strategy, generates a curve and then chooses a point on it.

Parameters:
  • dtStart - Start date for portfolio
  • dtEnd - End date for portfolio
  • dFuncArgs - Dict of function args passed to the function @return DataFrame corresponding to the portfolio allocations

stratMarkSharpe(dtStart, dtEnd, dFuncArgs)

source code 

@summary Calls stratMark with sharpe ratio point.

Parameters:
  • dtStart - Start date for portfolio
  • dtEnd - End date for portfolio
  • dFuncArgs - Dict of function args passed to the function @return DataFrame corresponding to the portfolio allocations

stratMarkLowVar(dtStart, dtEnd, dFuncArgs)

source code 

@summary Calls stratMark and uses lowest variance ratio point.

Parameters:
  • dtStart - Start date for portfolio
  • dtEnd - End date for portfolio
  • dFuncArgs - Dict of function args passed to the function @return DataFrame corresponding to the portfolio allocations

stratMarkMaxRet(dtStart, dtEnd, dFuncArgs)

source code 

@summary Calls stratMark and uses maximum returns.

Parameters:
  • dtStart - Start date for portfolio
  • dtEnd - End date for portfolio
  • dFuncArgs - Dict of function args passed to the function @return DataFrame corresponding to the portfolio allocations

stratMarkMinRet(dtStart, dtEnd, dFuncArgs)

source code 

@summary Calls stratMark and uses minimum returns.

Parameters:
  • dtStart - Start date for portfolio
  • dtEnd - End date for portfolio
  • dFuncArgs - Dict of function args passed to the function @return DataFrame corresponding to the portfolio allocations

stratMarkSharpeAlpha(dtStart, dtEnd, dFuncArgs)

source code 

@summary Calls stratMark and chooses the highest share point, uses future knowlege (alpha).

Parameters:
  • dtStart - Start date for portfolio
  • dtEnd - End date for portfolio
  • dFuncArgs - Dict of function args passed to the function @return DataFrame corresponding to the portfolio allocations

stratMarkMaxRetAlpha(dtStart, dtEnd, dFuncArgs)

source code 

@summary Calls stratMark chooses the highest returns point, uses future knowlege (alpha).

Parameters:
  • dtStart - Start date for portfolio
  • dtEnd - End date for portfolio
  • dFuncArgs - Dict of function args passed to the function @return DataFrame corresponding to the portfolio allocations