Changeset 9744 for branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/TradingProblemData.cs
- Timestamp:
- 07/24/13 12:51:02 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Problems.DataAnalysis.Trading/3.4/TradingProblemData.cs
r9743 r9744 37 37 38 38 #region default data 39 private static double[,] audInUsd = new double[,] {39 private static double[,] audInUsdDiff = new double[,] { 40 40 { 0.0000}, 41 41 { 0.0003}, … … 1589 1589 1590 1590 static TradingProblemData() { 1591 defaultDataset = new Dataset(new string[] { "AUD" }, audInUsd );1591 defaultDataset = new Dataset(new string[] { "AUD" }, audInUsdDiff); 1592 1592 defaultDataset.Name = "AUD in USD"; 1593 1593 defaultDataset.Description = "Price of Australian dollar in US dollar."; … … 1630 1630 : base(dataset, allowedInputVariables) { 1631 1631 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))); 1633 1633 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))); 1634 1634 RegisterParameterEvents(); … … 1646 1646 OnChanged(); 1647 1647 } 1648 1649 1650 1651 1652 //#region Import from file1653 //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 //#endregion1665 1648 } 1666 1649 }
Note: See TracChangeset
for help on using the changeset viewer.