vsaveris / trading-technical-indicators Goto Github PK
View Code? Open in Web Editor NEWTrading Technical Indicators python library
Home Page: https://www.trading-technical-indicators.org/
License: MIT License
Trading Technical Indicators python library
Home Page: https://www.trading-technical-indicators.org/
License: MIT License
Tasks:
The task is targeting planned release: 0.2 stable-release (01-01-2021)
Technical Indicators calculation times, for 3169 trading days.
Tasks:
init
and setup
filesdevelopment
branch to master
and add release tagrunSimulation method applies currently trading signals as they received without considering the current portfolio status (long and short positions). As a result the simulation outcome is not reliable.
The method should be updated so that the trading signals will be applied considering long and short open positions.
Target release 0.1.b3
Tasks:
Tasks:
init
and setup
filesdevelopment
branch to master
and add release tagMachine learning features implementation progress tracker.
The runSimulation
method of thetti.indicators
package will become deprecated in the next beta release. it will be replaced by the new method getTiSimulation. Details about the new method will be added here.
Development Tasks:
runSimulation
method (will be removed in the first stable release)getTiSimulation
method in the tti.indicators
packageTradingSimulation
of the tti.utils
packageTesting Tasks:
test_indicators_common.py
and remove the existing tests for this methodtest_utils_trading_simulation.py
for matching the new implementationTradingSimulation
classgetTiSimulation
method in the test_indicators_common.py
tti
package_createMLDataFeatures
function can be time consuming depending the amount of trading technical indicators used as features for the ML data. Concurrency should be implemented.
runSimulation
function (_technical_indicator
module of tti.indicators
package) has been replaced by the getTiSimulation
function in release 0.1.b3
. It should be removed prior to release 1.0.0
Tasks:
runSimulation
function from moduleTtiPackageDeprecatedMethod
exception from the tti.utils
package, exceptions
modulerunSimulation
functionAdd import statements for the indicators
and the utils
subpackages, of the tti
package, in the __init__.py
.
Currently the getTiSimulation returns a pandas.DataFrame with simulation data and a dict containing simulation statistics.
The function will be updated so to return also a matplotlib.pyplot object including the close price, exposure and balance during the simulation period. An example of such object is shown below:
Tasks:
Currently, in the runSimulation method of the tti.package, all the buy
trading signals are processed, without any limitation on the investment.
This can bring some unrealistic scenarios, in case of a high number of consecutive buy
signals. In that case the investment can become very high.
For this reason a new input argument should be introduced (max_investment). In case where max_investment already reached, new buy
signals are being ignored, till some balance becomes available with a sell
trading signal.
Simulation code, and returned simulation data should be updated accordingly. ignored_buy_signals
entry should be included in the returned statistics.
Target release 0.1.b3
Tasks:
MachineLearningData
class has been implemented. Unit test cases should be developed with coverage 100%.
Execution of the unit tests should be done after concurrency is (issue #24) implemented.
Update /docs/source/examples.rst with example code and output about the usage of the fillMissingValues method of the tti.utils package.
Review and optionally implement the below Trading Technical Indicators.
Each implementation has to be in a separate issue. This issue will be used for overall tracking.
Hi,
the website states there are 62 indicators but with this code
from tti.indicators.properties.indicators_properties import INDICATORS_PROPERTIES
print(len(list(INDICATORS_PROPERTIES.keys())))
I get 57 indicators.
What's wrong?
PS: I'm Carlo, not Carlos ๐
Thanks.
In /docs/source/examples.rst , trading signal output has been missed. Add the missing printout and merge the documentation branch to master, in order ReadTheDocs to get the updates.
Hi,
I wrote a simple script to test 0.2.
It retrieves all the indicators and tests each of them against your sample csv.
the code is
import pandas as pd
from tti.indicators import *
from tti.indicators.properties.indicators_properties import INDICATORS_PROPERTIES
indicators_list = list(INDICATORS_PROPERTIES.keys())
df = pd.read_csv('./sample_data.csv', parse_dates=True, index_col=0)
indicators = []
for i in range(len(indicators_list)):
input_data_str = 'input_data={}'.format('df')
indicators.append(eval('{}({})'.format(indicators_list[i], input_data_str)))
print('{} โ {}'.format(indicators_list[i], indicators[i].getTiSignal()[0]))
then its output is
AccumulationDistributionLine โ buy
AverageTrueRange โ buy
BollingerBands โ hold
ChaikinMoneyFlow โ hold
ChaikinOscillator โ hold
ChandeMomentumOscillator โ hold
CommodityChannelIndex โ hold
DetrendedPriceOscillator โ hold
DirectionalMovementIndex โ hold
DoubleExponentialMovingAverage โ buy
EaseOfMovement โ hold
Envelopes โ hold
FibonacciRetracement โ hold
but then it excepts on the next one (ForecastOscillator
) with
ValueError: cannot set using a slice indexer with a different length than the value
.
What could have happened?
Thanks.
Tasks:
The task is targeting planned release: 0.2 stable-release (01-01-2021)
Task Status:
PSAR trading signal has been implemented wrongly.
Close Long signal is when price falls below SAR
Close Short signal is when price rises above SAR
The signal has been implemented in a reversed to the above rules way.
runSimulation method currently has an input argument called commission
:
commission (float, default=0.0): Commission for each transaction.
The runSimulation method is used for evaluating trading signals initiated by the indicators, for a specific stock data.
commission
argument is not needed for the specific purpose since can provide misleading results about the indicator, so it will be removed. The only arguments will remain in the method are:
close_values (pandas.DataFrame): The close prices of the stock, for
the whole simulation period. Index is of type DateTimeIndex
with same values as the input to the indicator data. It
contains one column close.
max_items_per_transaction (int, default=1): The maximum number of
stocks to be traded on each open_long or open_short
transaction.
max_investment(float, default=None): Maximum investment for all the
opened positions (short and long). If the sum of all
the opened positions reached the maximum investment, then it is
not allowed to open a new position. A new position can be
opened when some balance becomes available from a position
close. If set to None, then there is no upper limit for the opened
positions.
Update _getSimulationGraph
function of the _technical_indicator
module (tti.indicators
package), with color gradient fill feature.
Currently lines coverage with the implemented unit test cases is 91%. Add test cases to reach code coverage of 100%.
Intraday Momentum Index
is implemented wrongly as Intraday Movement Index
.
Correct the name of the indicator and apply the changes in the whole project (i.e. module, class name, docstring, test cases, constants etc.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.