public List <double> volatilityList(DateTime startDate, DateTime endDate, Underlying under, string type) { HistoryVolCalculator histVolCal = new HistoryVolCalculator(); OracleDataBaseConnect connect = new OracleDataBaseConnect(); connect.DBSetting_ = DBSettingInfoManger.dbSetting("MRO"); string queryName = "Underlying"; connect.addQuery(queryName, ""); connect.excute(); List <double> resultVol = new List <double>(); foreach (DataRow item in connect.ResultDataSet_.Tables[queryName].Rows) { double vol = Convert.ToDouble(item["Value"].ToString()); resultVol.Add(vol); } histVolCal.ValueList_ = resultVol; histVolCal.historyCalVol(); return(histVolCal.ValueList_); }
public List<double> volatilityList(DateTime startDate,DateTime endDate, Underlying under, string type) { HistoryVolCalculator histVolCal = new HistoryVolCalculator(); OracleDataBaseConnect connect = new OracleDataBaseConnect(); connect.DBSetting_ = DBSettingInfoManger.dbSetting("MRO"); string queryName = "Underlying"; connect.addQuery(queryName,""); connect.excute(); List<double> resultVol = new List<double>(); foreach (DataRow item in connect.ResultDataSet_.Tables[queryName].Rows) { double vol = Convert.ToDouble(item["Value"].ToString()); resultVol.Add(vol); } histVolCal.ValueList_ = resultVol; histVolCal.historyCalVol(); return histVolCal.ValueList_; }
private void positionLoad() { this.PositionList_ = new List <string>(); QueryStr queryStr = new QueryStr(this.positionInfo_); queryStr.VariableMap_.Add("STD_DATE", this.ReferenceDate_.ToString("yyyyMMdd")); queryStr.VariableMap_.Add("FUND_CODE", "A27212','A27211','A27214"); conn_.clearQuery(); conn_.addQuery("position", queryStr.getQuery()); conn_.excute(); DataTable tb = conn_.ResultDataSet_.Tables["position"]; foreach (DataRow item in tb.Rows) { this.PositionList_.Add(item["KR_CODE"].ToString()); } }
private DataSet connectDB() { DataSet dataSet = new DataSet(); string query = ""; OracleDataBaseConnect dbConnect = new OracleDataBaseConnect(); dbConnect.DBSetting_ = DBSettingInfoManger.dbSetting("MRO"); dbConnect.addQuery("OptionPositionHist", query); dbConnect.excute(); return dbConnect.ResultDataSet_; }
private DataSet connectDB() { DataSet dataSet = new DataSet(); string query = ""; OracleDataBaseConnect dbConnect = new OracleDataBaseConnect(); dbConnect.DBSetting_ = DBSettingInfoManger.dbSetting("MRO"); dbConnect.addQuery("OptionPositionHist", query); dbConnect.excute(); return(dbConnect.ResultDataSet_); }
public List <double> loadHistory(string itemCode, DateTime startDate, DateTime endDate) { OracleDataBaseConnect conn = OracleDataBaseConnect.CreateOracleDBConnet("Local"); QueryStr query = new QueryStr(fileInfo1_); query.VariableMap_.Add("stockID", itemCode); query.VariableMap_.Add("startDate", startDate.ToString("yyyyMMdd")); query.VariableMap_.Add("endDate", endDate.ToString("yyyyMMdd")); conn.addQuery("Test", query.getQuery()); conn.excute(); List <double> valueList = new List <double>(); List <string> datestr = new List <string>(); foreach (DataRow item in conn.ResultDataSet_.Tables["Test"].Rows) { valueList.Add(Convert.ToDouble(item["CURR_PRICE"].ToString())); datestr.Add(item["STD_DATE"].ToString()); } return(Result_); }