SQL  Output

Appendix A: SQL Scripts for Sample Queries

hist_qry7.sql

Determine the value of $100,000 now if 1 year ago it was invested equally in 10 specified stocks (That is, allocation for each stock is $10,000). The trading strategy is: When the 20-day moving average crosses over the 5-month moving average the complete allocation for that stock is invested and when the 20-day moving average crosses below the 5-month moving average the entire position is sold. The trades happen on the closing price of the trading day.





Copyright © 2005. Sybase Inc. All rights reserved. Output

View this book as PDF