| Index | Recent Threads | Who's Online | User List | Search |
|
|
![]() |
Portfolio123 » List all forums » Forum: Simulations and Portfolios » Thread: Rank = 1 |
|
Total posts in this thread: 10 |
[Request a Feature]
[Post new Thread] [Add To My Favorites] [Watch this Thread] |
| Author |
|
|
Koronbock
Advanced Member ![]() GERMANY Joined: Jun 11, 2006 Posts: 166 Status: Offline |
Hi there, I have seen in the Sell Rule of some Sims just one single line: 1 (the number one). Apparently this is referring to rank. What does this mean? Does it mean to sell a portfolio if the Rank is 1 ? Hm, must be something else...?? Thanks. Wern |
||
|
|
dwpeters
Advanced Member
|
Hi, If the sell rule evaluates to true (1), the sim/port will sell the stock at rebalance. A sell rule of 1 is always true so all stocks are always sold at rebalance. Same as rank > 101 which has often been used. Don |
||
|
|
Koronbock
Advanced Member ![]() GERMANY Joined: Jun 11, 2006 Posts: 166 Status: Offline |
Don, Thanks for the explanation. I was confused because in some sims there is just the number "1" on the right sight of the sell rules. I does not say: Rank > 1; instead it just says: 1 (just the number, nothing else). which was confusing for me. Wern |
||
|
|
o806
Advanced Member
|
Wern: Everyone except computer programmers (and academic logicians) will be confused by what "1" means as a sell rule. "1" is how a computer records "true" in its numerical notation. Putting "1" in a sell rule is a very quick way to tell the computers at P123 that you want to sell ALL the stocks in a simulation or portfolio. In particular, "1" does not mean "rank > 1" although both would have the same effect, namely selling all the stocks (unless a stock had a rank of 1). "1" by itself is often used by P123 users who have a knowledge of computer programming when they want to force P123 to sell all stocks. Another common way to force the sale of all stocks is to write a sell rule that will be "true" for every stock. A favorite one is "rank < 101" which will be true for all stocks because the highest possible rank is 100. A rule like "rank < 150" would work just as well. Another rule that will always be true would be "close(0) < 10000000000" since no stocks that I know of have a price greater than 10 million per share. Other P123 users get creative by putting in a sell rule that does not refer to anything to do with a stock. For example, "2=2" is always true so the computer records that as a "1" and will thus sell all the stocks. One could also use "3 < 5" since this is always "true". Some p123 do not bother writing a comparison rule at all and and just put "1" in the sell rule. So "1" as a sell rule does not refer to anything about the stock at all. It is just one of a thousand ways a user can tell P123 to sell all stocks. Regards, Brian ---------------------------------------- [Edit 1 times, last edit by o806 at Jan 3, 2010 2:28:40 PM] |
||
|
|
Koronbock
Advanced Member ![]() GERMANY Joined: Jun 11, 2006 Posts: 166 Status: Offline |
Brian, thanks for the explanation. I am sure there are many out there who did not know/understand this. Thanks. Wern |
||
|
|
dmicsa
Advanced Member
|
Wern, Rules have to be evaluated to true(=1) or false(=0) to be executed or not. So if a rule evaluates to 1 that means do it or as Brian sad sell them all. Is a nice thing to know and makes sense to me. |
||
|
|
linzjonz
Advanced Member
|
Probably more to the point is why would you use such a rule ? Speaking for myself it is useful in establishing a "baseline" when developing Sell rules. The rule "1" sells everything at each rebalance. You can then proceed to try various other sell rules and compare the performance and turnover with this. I don't expect you'd see the rule used much in real world trading Cheers Lindsay |
||
|
|
olikea
Advanced Member
|
Just a quick point some might find useful: the interpretation 0 and 1 in this case is not quite the same as "false" and "true" because p123 will accept numbers inbetween, and regard them as "partial sales". E.g. 0.5 means "sell half the position". So the number means how much of the position is sold, ranging from 0 (sell nothing) to 1 (sell everything). Logical test expressions will either return 0 or 1 corresponding to true or false, but it is possible to engineer expressions that return some other number, e.g. useful for trimming positions if they become overweight. |
||
|
|
o806
Advanced Member
|
olikea: Thanks for the info on numbers between 0 and 1. Do we know what happens if the expression evaluates to a number above 1 (like 2)? And what happens if the numerical result is less than zero? Regards, Brian |
||
|
|
DennyHalwes
Advanced Member UNITED STATES Joined: Apr 28, 2004 Posts: 1532 Status: Offline |
I ran a few tests: A negative number returns the error; Sell factor must be between 0 and 1.0 I tried 2 and 10. They gave the same results as 1. So the error above is only half true! Denny ![]() ---------------------------------------- "The significant problems we face cannot be solved at the same level of thinking that we were at when we created them". Albert Einstein |
|||
|
| [Show Thread Printable Version] [Post new Thread] |