Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/24/13 12:51:02 (11 years ago)
Author:
gkronber
Message:

#1508 refactoring: removed unused classes, unified calculation of profits and signals, implemented profit-evaluator.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/TradingProblemData.cs

    r9743 r9744  
    3737
    3838    #region default data
    39     private static double[,] audInUsd = new double[,] {
     39    private static double[,] audInUsdDiff = new double[,] {
    4040    { 0.0000},
    4141    { 0.0003},
     
    15891589
    15901590    static TradingProblemData() {
    1591       defaultDataset = new Dataset(new string[] { "AUD" }, audInUsd);
     1591      defaultDataset = new Dataset(new string[] { "AUD" }, audInUsdDiff);
    15921592      defaultDataset.Name = "AUD in USD";
    15931593      defaultDataset.Description = "Price of Australian dollar in US dollar.";
     
    16301630      : base(dataset, allowedInputVariables) {
    16311631      var variables = InputVariables.Select(x => x.AsReadOnly()).ToList();
    1632       Parameters.Add(new ConstrainedValueParameter<StringValue>(PriceVariableParameterName, new ItemSet<StringValue>(variables), variables.Where(x => x.Value == targetVariable).First()));
     1632      Parameters.Add(new ConstrainedValueParameter<StringValue>(PriceVariableParameterName, new ItemSet<StringValue>(variables), variables.First(x => x.Value == targetVariable)));
    16331633      Parameters.Add(new FixedValueParameter<DoubleValue>(TransactionCostsParameterName, "The absolute cost of on buy/sell transaction (assumed to be constant and independent of transaction volume)", new DoubleValue(0.0002)));
    16341634      RegisterParameterEvents();
     
    16461646      OnChanged();
    16471647    }
    1648 
    1649    
    1650 
    1651 
    1652     //#region Import from file
    1653     //public static TradingProblemData ImportFromFile(string fileName) {
    1654     //  TableFileParser csvFileParser = new TableFileParser();
    1655     //  csvFileParser.Parse(fileName);
    1656 
    1657     //  Dataset dataset = new Dataset(csvFileParser.VariableNames, csvFileParser.Values);
    1658     //  dataset.Name = Path.GetFileName(fileName);
    1659 
    1660     //  TradingProblemData problemData = new TradingProblemData(dataset, dataset.VariableNames.Skip(1), dataset.VariableNames.First());
    1661     //  problemData.Name = "Data imported from " + Path.GetFileName(fileName);
    1662     //  return problemData;
    1663     //}
    1664     //#endregion
    16651648  }
    16661649}
Note: See TracChangeset for help on using the changeset viewer.