Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R-Forge #362] Read txns from csv #24

Open
joshuaulrich opened this issue May 13, 2016 · 0 comments
Open

[R-Forge #362] Read txns from csv #24

joshuaulrich opened this issue May 13, 2016 · 0 comments

Comments

@joshuaulrich
Copy link
Collaborator

Submitted by: Peter Carl
Assigned to: Peter Carl
R-Forge link

Function to read transactions from a csv file and insert them into a portfolio. Key columns would be:

Portfolio: Could be specified as an argument or read from the file.

Symbol or identifier

Timestamp

Txn.Qty: the quantity, usually in units of contracts, changing hands.
Positive values indicate a 'buy' transaction; negative values
are used to indicate a 'sell.'

Txn.Price: the price at which the transaction was made

Txn.Fees: the sum total of transaction fees associated with the trade

Txn.Value: the notional value of the transaction

Followups:

Date: 2010-01-18 14:09
Sender: Brian Peterson
function addTxns has been added to SVN, and takes a xts object with columns 'Quantity' and 'Price'It is a TODO to extend it to handle fees as well.I'm not sure we need to create a special CSV loader that would only txns<-xts(read.zoo('txnfile.csv))addTxns('port',txns)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant