print('Hello world')
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/security/limits.conf | |
#<domain> <type> <item> <value> | |
root hard nofile 999999 | |
root soft nofile 999999 | |
root hard core -1 | |
root soft core -1 | |
root hard data -1 | |
root soft data -1 | |
root hard fsize -1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. | |
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using QuantConnect.Data; | |
using QuantConnect.Data.Market; | |
using QuantConnect.Indicators; | |
using QuantConnect.Securities; | |
using QuantConnect.Securities.Forex; | |
using System; | |
using static System.Diagnostics.Debug; | |
namespace QuantConnect.Algorithm.CSharp | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. | |
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using MathNet.Numerics; | |
using MathNet.Numerics.Distributions; | |
using MathNet.Numerics.Statistics; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace Optimization | |
{ | |
public class DeflatedSharpeRatio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. | |
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def cointegration_test(df_data, start_date=None, end_date=None, verbose=False): | |
"""This method test for correlation and cointegration all the combinations | |
of stocks in the period defined by start_date and end_date. | |
Following the paper "High Frecuency and Dynamic Pairs Trading Based on | |
Statistical Arbitrage Using a Two-Stage Correlation and Cointegration Approach", | |
the method first test if the correlation has a pearson coefficient bigger than 0.9. | |
Then run a simple cointegration test and if the p-values is less than 0.1, then run | |
an Augmented Dickey–Fuller test. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using QuantConnect.Data; | |
using QuantConnect.Data.Market; | |
using QuantConnect.Indicators; | |
using QuantConnect.Orders; | |
using QuantConnect.Orders.Fees; | |
using QuantConnect.Orders.Fills; | |
using QuantConnect.Securities; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. | |
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, |