Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
why are the log output and transaction details very different ???

I print the log in my algorithme , log out put is

2012-01-30myfunc:46INFOBuying Equity(16607 [CTIC])now price 5.45now price two5.45last close 6.65
2012-01-31myfunctwo:62INFOselling Equity(16607 [CTIC])now price 5.5now price two5.5last close 5.45the openprice is5.6
2012-02-22myfunc:46INFOBuying Equity(20961 [CETV])now price 6.95now price two6.95last close 8.48
2012-02-23myfunctwo:62INFOselling Equity(20961 [CETV])now price 7.28now price two7.28last close 6.95the openprice is7.07
2012-04-18myfunc:46INFOBuying Equity(26323 [GNW])now price 5.8689now price two5.8689last close 7.7
2012-04-19myfunctwo:62INFOselling Equity(26323 [GNW])now price 6.035now price two6.035last close 5.8689the openprice is6.01

but the Transaction Details is :

Date Security Transaction Quantity Last SalePrice $ Amount
2012-01-31 -Buys $4,053.49(1 transactions) $4,053.49 $5.53 733 BUY CTIC
2012-02-01 -Sells $3,936.21(1 transactions) ($3,936.21) $5.37 -733 SELL CTIC
2012-02-23 -Buys $4,152.08(1 transactions) $4,152.08 $7.31 568 BUY CETV
2012-02-24 -Sells $4,140.72(1 transactions) ($4,140.72) $7.29 -568 SELL CETV
2012-04-19 -Buys $4,075.68(1 transactions) $4,075.68 $6.07 672 BUY GNW
2012-04-20 -Sells $4,045.44(1 transactions) ($4,045.44) $6.02 -672 SELL GNW

who can tell me why so different nomatter the price ,even the date is also different .

1 response

When you place an order it is filed at the end of the next bar of data, so if you look at your dates of transactions they are all the day after your printed dates. Consequently, the price is going to be different than the one you print as well.

Take a look at Alisa's response on this thread and on the FAQ page.

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.