BasicPortfolio implements transaction costs and simple stop-loss / take-profit policies. Transaction costs are expressed as a fraction of the transaction value (e.g. 0.001 == 0.1%). This portfolio uses all available cash to buy as many units as possible at each buy signal, and liquidates all positions at each sell signal. Stop-loss and take-profit are checked at each update and positions are liquidated if the price breaches the stop-loss or take-profit thresholds. Stop-loss and take-profit are fractions relative to the acquisition price (e.g. 0.1 == 10%). By default transaction costs are 0 and stop-loss / take-profit are NaN (disabled).