Beispiel #1
0
        public void GarchFromExtData()
        {
            var garch = new GARCHModel(GARCHModel.GARCHType.EGARCH, 1, 1, _extData);

            Assert.IsTrue(garch.CanUseMLE());
            garch.FitByMLE(200, 100, 0, null);
            Write($"Sample mean: {_extData.SampleMean()} \n");
            Write($"Desc: {garch.Description}");
        }
Beispiel #2
0
        public void GarchSimulates()
        {
            var _garch       = new GARCHModel(GARCHModel.GARCHType.Standard, 1, 1);
            var simulateData = _garch.SimulateData(_dates, 22);

            Assert.NotNull(simulateData);
            Assert.IsTrue(simulateData.Count > 0);
            Write($"Sample mean: {simulateData.SampleMean()}");
            _garch.TheData = simulateData; // Feed back in
            _garch.FitByMLE(200, 100, 0, null);
            Write(_garch.Description);
        }