bkrajendra / trader-dss Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/trader-dss
Automatically exported from code.google.com/p/trader-dss
going to the login page should save your login name and destroy the session
then save the login name to a new session.
The current behavior would allow the next user (if they browser was left
open) to have the rest of the contents of the cookie (sql etc)
Original issue reported on code.google.com by [email protected]
on 27 Jan 2010 at 10:39
Need to confirm deletion of portfolio since the button is right next to the
select one.
Should be a simple javascript popup
Original issue reported on code.google.com by [email protected]
on 1 Feb 2010 at 3:59
Shouldn't require the quotes table to be included. Since all quote and
indicator tables are keyed on 'symb' 'date' 'exch' it shouldn't be hard to
just require them.
Original issue reported on code.google.com by [email protected]
on 27 Jan 2010 at 9:58
trade.php isn't the easiest place to debug sql. You need to be able to save
favorite queries and execute them.
Original issue reported on code.google.com by [email protected]
on 25 Jan 2010 at 10:24
There aren't enough technical indicators, need to add some
Original issue reported on code.google.com by [email protected]
on 11 Feb 2010 at 11:14
A table of symbols that have exceed the portfolio sell stop should be
listed on their own on the booty page.
A portfolio could have a 'stop loss' percentage property to facilitate this.
Original issue reported on code.google.com by [email protected]
on 1 Feb 2010 at 4:34
The wikipedia page for W%R says
***********
Williams used a 10 trading day period and considered values below -80 as
oversold and above -20 as overbought. But they were not to be traded
directly, instead his rule to buy an oversold was
* %R reaches -100%.
* Five trading days pass since -100% was last reached
* %R rises above -95% or -85%.
***********
To be able to select stocks that match this, we need to be able to use a
query something like
# oversold (os) stocks
select symb, exch, wpr_10 from indicators where wpr_10_os_80 = 5 and wpr_10
< -85 and date = 'xxxx-xx-xx';
Original issue reported on code.google.com by [email protected]
on 19 Jan 2010 at 2:27
This probably happened when I changed the file layout so that creating the
form was in a function. It's probably not sending the validation because
it's having the form created a second time and re-displayed. Portfolios was
like this too.
I don't much like quickforms. It's not much quicker than straight html and
the only thing you gain is simple validation rules. You lose all ability to
lay out the form though.
Original issue reported on code.google.com by [email protected]
on 4 Feb 2010 at 10:44
Several simple utility functions need to be written and will be used again
and again. get_pf_name() get_exchange_name() etc.
create trader-functions.php for them
Original issue reported on code.google.com by [email protected]
on 26 Jan 2010 at 8:54
Have to be able to select quantity, must be less than the available funds
Not sure about other details!
Original issue reported on code.google.com by [email protected]
on 27 Jan 2010 at 10:05
When working out how much a stock has gained, the function works backwards.
What is the expected output?
The 10, 20, 30, 50, 100, 200 day gains should contain how much the stock
has gained in that many days.
What do you see instead?
It finds the quote 10, 20, etc. days ago and says how much it will gain
in the next 10, 20, etc. days. Like telling the future, only in the past!
Please use labels and text to provide additional information.
Original issue reported on code.google.com by [email protected]
on 12 Jan 2010 at 9:57
'Select Query to Edit' should be sorted by name and default to the
currently selected query
Original issue reported on code.google.com by [email protected]
on 27 Jan 2010 at 10:23
Shorts need to be charted on their own.
Original issue reported on code.google.com by [email protected]
on 4 Feb 2010 at 10:42
Use PhpDocumentator to produce html module/function documentation
All the functions will need to be updated with the right headers.
This might be a good time to correct/standardize the function and variable
names and even move to only having one database object passed around by
reference.
Original issue reported on code.google.com by [email protected]
on 31 Jan 2010 at 9:50
Create using a table with links in it and coloured cells to start with.
Tabs should be...
Login: Only one selectable if $_SESSION['uid'] isn't set. Selecting it when
it is set should unset it (logout)
Portfolios: Create/delete or select a portfolio
Pot/Booty: Chart progress of portfolio and list the stocks in it. Should be
able to move backwards and forwards through the life of the portfolio from
there.
Search/Select: Run SQL queries to choose stocks and put them into the
cart/watch list. Should have integration with the portfolio when selected
stocks are already in it, also with the buy/watch lists.
Trade: Buy/sell, long/short stocks
Watch: manage your watch list.
Queries: manage your stored queries.
Original issue reported on code.google.com by [email protected]
on 26 Jan 2010 at 9:02
Implement the basic shopping cart.
Not the buying part, just the loading shares into it and displaying it part.
Original issue reported on code.google.com by [email protected]
on 26 Jan 2010 at 8:51
the PDO 'query' method doesn't seem to expose the error message from
postgresql when a submitted query has a syntax or logical error.
I need to find a way to return that info to the user.
Original issue reported on code.google.com by [email protected]
on 25 Jan 2010 at 10:26
The PHP needs to
o. check that the username is set, redirect to login if not
o. check that the portfolio is set, redirect to portfolio choose if not
o. show the portfolio details
o. allow deposit/withdrawal from portfolio
o. allow editing of defaults (parcel size etc)
o. display performance of portfolio to date (total value, pot value, shares
value, profit from shares.
o. have link to trading page
Original issue reported on code.google.com by [email protected]
on 20 Jan 2010 at 1:04
Some of the comments are on the tables themselves. That needs to be
completed and made part of the user interface.
Original issue reported on code.google.com by [email protected]
on 25 Jan 2010 at 10:29
I've been hard coding the database name, username and password into the php
of the web interface. It would be much better to have these stored in a
config file and loaded at runtime
Original issue reported on code.google.com by [email protected]
on 27 Jan 2010 at 10:07
Create a page that
checks if username is set otherwise redirect to login page
checks if portfolio is set, otherwise redirect to portfolio chooser
trading needs to:
o. allow entry of sql to select stocks (limit 10,100 etc.)
o. show tabulated query results
o. allow selection of stocks to chart/add to shopping cart/add to wish list
o. allow purchasing of shares in cart
o. allow moving on to the next trading day (if it exists)
o. ask for confirmation if moving on when stocks are in shopping cart
o. reset shopping cart for next day
o. preserve wish list between days
o. have a link back to the portfolio management page.
Original issue reported on code.google.com by [email protected]
on 20 Jan 2010 at 1:07
Perhaps you should get a warning if you try to buy a stock but you are
buying a significant percentage of a normal day's trade
Original issue reported on code.google.com by [email protected]
on 4 Feb 2010 at 8:25
Currently most functions fail if the data's been calculated before because
they only use 'insert' and not update 'update'.
This enhancement is to replace inserts with this type of code
update X, X where Y, Y;
if not found
insert X, X;
endif;
this shouldn't be much slower since it will always use an index
Original issue reported on code.google.com by [email protected]
on 13 Jan 2010 at 12:52
The default comment added to a share in the watch or buy list is '$pf_name,
$pf_working_date' It would be better to be '$select_name, $pf_working_date'
so that the query that selected it could be more readily identified.
Particularly since the buy/watch lists are associated with only one portfolio
Original issue reported on code.google.com by [email protected]
on 30 Jan 2010 at 12:43
Because trade dates doesn't have primary key or uniqueness constraint, the
new update_trade_dates function is only inserting rows
Original issue reported on code.google.com by [email protected]
on 16 Jan 2010 at 10:05
Enhance the portfolios table, portfolio object and the buy/sell routines to
account for a flat rate of commission on a buy and sell as well as stamp
duty at a flat rate.
Original issue reported on code.google.com by [email protected]
on 15 Feb 2010 at 11:10
The 'use' and 'delete' buttons are close together. There should be a
confirmation on the delete for queries just like for portfolios.
Original issue reported on code.google.com by [email protected]
on 12 Feb 2010 at 10:41
cash numeric(12.2) should be enough
The portfolios page needs to have a field added to allow a portfolio to be
created with an opening balance.
Original issue reported on code.google.com by [email protected]
on 27 Jan 2010 at 4:01
This has been done with symb, so it should be done with date and exch. Then
you wouldn't need to include the quotes table unless you needed open, high,
low, close or volume.
Perhaps more queries could be done without a join.
Original issue reported on code.google.com by [email protected]
on 27 Jan 2010 at 4:04
the ma_sum* variables need to be numeric(12,2)
Original issue reported on code.google.com by [email protected]
on 12 Jan 2010 at 11:16
Exchange has already become a class. This enhancement is to create a
portfolio class and alter all scripts to use it.
Original issue reported on code.google.com by [email protected]
on 10 Feb 2010 at 2:23
When a row is added to table 'quotes' a trigger fires and calls the
functions that update the derived tables.
Those functions should be called within a transaction so that they either
all work or none do
Original issue reported on code.google.com by [email protected]
on 7 Feb 2010 at 9:54
Charts tab should allow development and saving of custom charts. These can
be selected and used to chart on all other tabs.
Original issue reported on code.google.com by [email protected]
on 11 Feb 2010 at 11:15
The shopping cart and watch list should indicate if a share is to be bought
long or sold short. Table defs will need to be changed. Perhaps a field
called 'type' with allowed values of 'L' and 'S'
These should have a binary index on them
Original issue reported on code.google.com by [email protected]
on 26 Jan 2010 at 8:53
Need to be able to delete a portfolio and have it clean up all the other
tables.
Trades, cart, watch, holdings and portfolios. Needs to be done in a
transaction.
Original issue reported on code.google.com by [email protected]
on 1 Feb 2010 at 8:52
It currently looks like this
trader=# \d portfolios
Table "public.portfolios"
Column | Type | Modifiers
--------------+------------------------+----------------------------------------
-------------------
pfid | integer | not null default
nextval('portfolios_pfid_seq'::regclass)
name | character varying(100) | not null
exch | character varying(6) | not null
uid | integer | not null
parcel | numeric(12,2) |
start_date | date | not null
working_date | date | not null
Indexes:
"portfolios_pkey" PRIMARY KEY, btree (pfid)
"portfolios_uid_key" UNIQUE, btree (uid, exch, name)
It doesn't need the start_date in it because that's created in pf_summary
with the opening balance when the portfolio is created.
It should contain a field to tell if the stock names should be replaced
with their md5 hashes to stop you from learning them when doing practice
trading.
Original issue reported on code.google.com by [email protected]
on 4 Feb 2010 at 8:47
Will need something like this done to cart, trades, watch
alter table cart add column exch character varying(6);
update cart set exch = 'L';
alter table cart alter column exch set NOT NULL;
alter table cart drop CONSTRAINT cart_pkey ;
alter table cart add constraint cart_pkey PRIMARY KEY (pfid, symb, exch, date);
ALTER TABLE ONLY cart ADD CONSTRAINT constraint_stocks FOREIGN KEY (symb,
exch) REFERENCES stocks(symb, exch) MATCH FULL;
Original issue reported on code.google.com by [email protected]
on 8 Feb 2010 at 2:04
perhaps
holdings
Column | Type | Modifiers
---------+------------------------+-----------
pfid | integer | not null
symb | character varying(10) | not null
avgprice| numeric(9,2) | not null
volume | numeric(12,0) | not null
so that it's easier to work out what's currently in the portfolio.
Original issue reported on code.google.com by [email protected]
on 30 Jan 2010 at 6:21
It can take hours to pull the days updates. It would be easy to run two
updates at the same time if one started from 'A' (or '0' actually) and the
other from 'Z'. The integrity constraints would stop them once they got to
the middle.
Original issue reported on code.google.com by [email protected]
on 27 Jan 2010 at 8:31
Time to create a web interface to hold user portfolios.
This issue is just for the login page and authentication
Original issue reported on code.google.com by [email protected]
on 19 Jan 2010 at 2:09
Create a page that will show lots of detail about a particular security. It
should give the current standard chart, plus charts based on all the
indicators and other data available for that security.
It needs to open in a new window or tab
Original issue reported on code.google.com by [email protected]
on 26 Feb 2010 at 10:52
I'm using a modified version of a demo script that came with ChartDirector.
I need to have a simple chart for the release code.
Original issue reported on code.google.com by [email protected]
on 2 Feb 2010 at 9:30
[trader@hostname bin]$ ./update-quotes.pl
[INFO][Seeking update to], 888 L 2005-09-29 2009-12-24
[INFO][inserting]888.L, 2009/12/29, 111.6000, 111.6000, 110.0000, 111.3000,
236400, 111.3000
DBD::Pg::st execute failed: ERROR: null value in column "name" violates
not-null constraint
CONTEXT: SQL statement "insert into stocks ( symb, exch, first_quote,
last_quote ) values ( $1 , $2 , $3 , $3 )"
PL/pgSQL function "update_stock_dates" line 7 at SQL statement
SQL statement "SELECT update_stock_dates( $1 , $2 , $3 )"
PL/pgSQL function "update_derived_tables" line 4 at perform at
./update-quotes.pl line 69.
ERROR: null value in column "name" violates not-null constraint
CONTEXT: SQL statement "insert into stocks ( symb, exch, first_quote,
last_quote ) values ( $1 , $2 , $3 , $3 )"
PL/pgSQL function "update_stock_dates" line 7 at SQL statement
SQL statement "SELECT update_stock_dates( $1 , $2 , $3 )"
PL/pgSQL function "update_derived_tables" line 4 at perform at
./update-quotes.pl line 69.
What is the expected output? What do you see instead?
should insert and calculate the derived tables
Please use labels and text to provide additional information.
Original issue reported on code.google.com by [email protected]
on 16 Jan 2010 at 12:24
Don't bother with updating a query definition in the queries table. Just
force the name to be unique for a user.
Then to modify a query all you do is give it a slightly different name and
save it. You can then delete the old one if you like. This will almost give
revision control to queries!
Original issue reported on code.google.com by [email protected]
on 27 Jan 2010 at 10:10
What is the expected output?
The amount a share has gained in the last X days
What do you see instead?
Update_gains works out how much the share will gain in the next X days
Please use labels and text to provide additional information.
Original issue reported on code.google.com by [email protected]
on 12 Jan 2010 at 11:08
The trades table contains old trades. It should be easy to create a page
that shows them so that you can easily revisit old trades to see what
happened after you sold them etc.
Original issue reported on code.google.com by [email protected]
on 11 Feb 2010 at 2:14
What steps will reproduce the problem?
1. create a new stock (running update-share_names.pl will do this)
2. fetch quotes on that stock (update-quotes.pl)
3. If there's only one quote like (71IN.L, "GBL INV SP GDR-144A" on
2009-02-04) then stocks.first_quote will be populated, but
stocks.last_quote won't be.
What is the expected output? What do you see instead?
if last_quote is NULL then it should be set to first_quote
Please use labels and text to provide additional information.
Original issue reported on code.google.com by [email protected]
on 24 Jan 2010 at 4:59
the php needs to do the following
o. check if the username is set, if not redirect to the login page
o. allow the user to create a portfolio
o. create a table listing the user's portfolios and their details
o. allow the user to select a portfolio and move to managing it
Original issue reported on code.google.com by [email protected]
on 20 Jan 2010 at 12:56
Selling should
1. add a trade for the -ve volume
2. remove volume from holdings
3. update pf_summary
Original issue reported on code.google.com by [email protected]
on 1 Feb 2010 at 4:32
This is where the real fun starts.
Users will have multiple portfolios with independent current dates in the
past. They will use a shopping cart and various technical charts to trade
each day stepping through the history of the exchange, experimenting with
different queries on the database and trading strategies.
When stocks have been selected, they will commit all pending trades from
their shopping basket to their portfolio and progress to the next trading day.
Original issue reported on code.google.com by [email protected]
on 16 Jan 2010 at 10:39
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.