我有一个名为' mytable '
的股票数据我想创建名为'diff_Close5'的数据框
我想将数据放入diff_Close5。如果股票波动率在过去5天内达到+ 5%一次(ex 20170704~201170710),1其他0
如何制作代码?
**我不会说英语。抱歉。 **
Commands2 commands = (Commands2)_applicationObject.Commands;
object[] contextGUIDS = new object[] { };
CommandBars cmdBars = (CommandBars)(_applicationObject.CommandBars);
CommandBar vsBarProject = cmdBars["Code Window"];
scenarioCommand = commands.AddNamedCommand2(_addInInstance, "OpenScenario", "Open scenario", "Open scenario data", true);
scenarioCommand.AddControl(vsBarProject);
答案 0 :(得分:0)
试试这个:
mytable$diff_Close5<- tail(mytable$Close, -1) - head(mytable$Close, -1)