Overall Statistics
Total Trades
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
19.839%
Drawdown
12.600%
Expectancy
0
Net Profit
0%
Sharpe Ratio
1.224
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0.188
Beta
0.018
Annual Standard Deviation
0.156
Annual Variance
0.024
Information Ratio
0.213
Tracking Error
0.19
Treynor Ratio
10.483
Total Fees
$1.00
namespace QuantConnect 
{
    public class QCUParameterizedAlgorithm : QCAlgorithm
    {
    	//Parameter attribute can be applied to any variable in the algorithm.
    	//If no parameter is set, it uses the default specified here (2013).
    	[Parameter("StartDate")]
    	public DateTime StartDateParameter = new DateTime(2013, 1, 1);
    	
    	[Parameter("EndDate")]
    	public DateTime EndDateParameter = new DateTime(2014, 1, 1);
    	
    	[Parameter]
    	public string Ticker;
    	
    	//By default we use the name of the property if no name specified.
    	[Parameter]
    	public decimal StartingCash = 25000;
    	
    	// Initialize the algorithm using our parameters
        public override void Initialize() 
        {
        	Resolution res = Resolution.Minute;
        	if (LiveMode) res = Resolution.Second;
        	
        	//Using parameters for starting cash 
        	SetCash(StartingCash);
        	
        	//Using parameters for start and end date
            SetStartDate(StartDateParameter);         
            SetEndDate(EndDateParameter);
            
            AddSecurity(SecurityType.Equity, Ticker, res);
        }

        public void OnData(TradeBars data) 
        {   
            if (!Portfolio.HoldStock) 
            {
            	Debug("STARTING CASH PARAMETER: " + StartingCash);
            	Debug("STARTING DATE PARAMETER: " + StartDateParameter);
            	Debug("ENDING DATE PARAMETER: " + EndDateParameter);
                Order(Ticker,  100);
            }
        }
    }
}