plutus-iv-org / plutus_backtest Goto Github PK
View Code? Open in Web Editor NEWplutus_backtest is a python package for backtesting investment decisions using Python 3.6 and above.
License: Other
plutus_backtest is a python package for backtesting investment decisions using Python 3.6 and above.
License: Other
open - close
open - open
close - close
close - open
line 170-173
We probably gotta change the naming convention for buy and sell date, since we can also go shorting its meaning opposite buy is actually sell therefore we probably gotta switch it to start trade and end date (for example rows 51-52).
Get rid of irrelevant functions that we are not going to use. (pricing, general view etc.)
puzzle_assembly function from our example is printing 2 plots before showing final graph
Error: Shape of passed values is (1, 5), indices imply (1, 3)
Here:
line 127, in portfolio_construction
new_dist_frame = pd.DataFrame(columns = act.index, data = new_dist).T
When we ''purchase stocks" in all data frames the 1st row is 1 day before the start date. I may assume its the same issue as with close date.
Those are:
port_mean_pct
LPM_2
top_per
worst_per
To change current accumulated % to more understandable:
1.17 = 17%
-matplotlib
-tabulate (tabular data in Python)
-pandas
-numpy
-seaborn (statistical data visualization)
...?
We talked about it already yesterday, for now I leave them but I ll remove it in the future when we discuss about what I wrote
df_daily_returns["Total"] = df_daily_returns.sum(axis=1)
df_daily_returns["Cumulative return"] = (1 + df_daily_returns["Total"]).cumprod()
Buddy, please look carefuly the close(open)_first_row it has the values actually of the first line so basically we count correctly the close/open relationship only for 1st compny which is being started in our portfolio, others just have 0.
I may asume that we can resolve this one before creating pivots (for example we take the 1st row of each open dfs and add it to close dfs, then it will have 0 and 1 indexes having the same date but then the do pct_change and then after pivots, so pivot will already adjust all daily changes + close/open for the 1st day of the trading).
320-323
While installing library on jupiter (python 3.8.3) below issue appears:
Looking in indexes: https://test.pypi.org/simple/
Note: you may need to restart the kernel to use updated packages.
ERROR: Could not find a version that satisfies the requirement backt==0.1.0 (from versions: none)
ERROR: No matching distribution found for backt==0.1.0
To add the bottom allowing to download sl/tp dictionary if the dictionary isnt empty. Or if its even empty CSV file will contain only one line such as "No sl/tp lvls have been reached".
I noted that general_statistic function will not work by itself.
self.final_portfolio need to be produced by running another (portfolio_construction) function.
We can include one function in another, so it will run relevant block of code automatically once called.
Try to merge pricing, consolidated & consolidated_detailed functions into 1.
@IlliaBoloto mentioned - I think that creating 3 functions such as pricing, consolidated & consolidated_detailed doesn't really make a sense. I would rather make one big function. And would also help partially to solve the problem described in this issue .
So apparently plotly graphics are working only with Firefox browser
Warning was suppressed by using:
import warnings
warnings.simplefilter(action='ignore', category=Warning)
This warning requires further investigation. Currently has no impact on overall project.
Implement benchmark line on accumulated return graphs
@IlliaBoloto mentioned that -
from row 45 we are loosing the conection b/w 'open price' and 'close price' since in Row 66 we take Adj close.
First line in daily returns (Row 81) was dropped which is not good. As the first line we need to add diff b/w close/open of the 1st trading day.
The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
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.