[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Creating a database from a tick list?



PureBytes Links

Trading Reference Links

Stephane,
I have to reconsider the main concept.
I find, till now, the fundamental period p1, by minimizing the error 
and then decrease this error by adding harmonics. The initial error 
is decreased indeed but there are some other fundamental periods that 
would give better results !
If, for example, the least error is 3% for per=400 [in the 100...1000 
range], the final combination of per, per/2, per/3, per/4 etc will 
give an error 1.8%, which is of course much better than the initial 
3%.
It is obvious that, in the first search, per=400 was selected among 
the rest because of the min error.
It is hard to explain how per=850, with initial error 4.8% will give 
a final combination down to 0.9%, but it happens.
The idea to minimize the error for each harmonic stage is not the 
correct path. 
I should consider the sum of Fourier summands as a whole and see the 
final error. 
It seems that the minimum per term does not give any guarantee for 
the minimum for the sum !!
It is not easy to understand and explain this, but I know it is true 
and I have to accept it.
I will revert with the new principle tomorrow, I am far from the 
office now. It is not good news, we should need more looping steps 
with the new approach, but...
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "Stephane Carrasset" 
<s.carrasset@xxxx> wrote:
> 
>   ----- Original Message ----- 
>   From: DIMITRIS TSOKAKIS 
>   To: amibroker@xxxxxxxxxxxxxxx 
>   Sent: Sunday, May 16, 2004 10:41 AM
>   Subject: [amibroker] Re: EFA vs FFT
> 
> 
>   Stephane,
>   a. What should I do after downloading and save this test.dll [it 
>   b. The fit criterion is the minimum total error.
>   The only way to express this quantity is to sum the abs(y-C1) for 
all 
>   bars and then minimize it.[In linear reg, for example, we 
minimise 
>   the sum of (y-C1)^2]
>   b1. What is your criterion, if not the minimum of 
>   LastValue(Cum(abs(y-C1)));
>   b2. Since you already have the equation of your blue line, check 
if 
>   it gives smaller error to see if it fits better than my white 
line.
> Dimitri, That's the only thing I do today, was to compare the afl 
and the dll
> the only difference between the Afl and the dll is the line
> error=LastValue(Cum(abs(y-new1))); in Afl
> 
> and becomes 
> 
> error=(Cum(abs(y-new1))); in the dll
> 
> 
> 
> the error is smallest in afl
> 
> 
> 
> 
> 
> But, I must think again about lastvalue in a loop, there is 
something that's I don't understand correctly
> 
> a simple example like 
> 
> for(i=10;i<12;i++)
> 
> {
> 
> Plot(MFI(i),"",i,1);
> 
> Plot(LastValue(MFI(i)),"",i+1,1);
> 
> }
> 
> shows that for all bars we have the MFI value of barcount -1
> 
> 
>   c. LastValue is used many times in my code, before the error 
>   calculation[ in lastx, Daysback, aa, bb, Hor. I did not 
understand 
>   how do you solve the LastValue in all these cases and where is 
the 
>   problem in error=LastValue(...) line.
>   d. In any case, it is reasonable to ask the total error to be 
>   minimum. The error per bar would not make sense. We may have a 
>   function that minimizes the error for the first, say, 500 bars 
but 
>   not for all bars.
>   d. I will agree that LastValue(array) is known "before" the last 
bar.
>   There is no problem here, I use the results of all the LastValue()
s 
>   exactly at the last bar, not before. This way of use does not 
>   introduce any "looking into the future" problem.[A problem, for 
>   example, would be to use a LastValue() result in the middle of an 
>   array and DECIDE for tomorrows movements]
>   TIA
>   Dimitris Tsokakis
>   PS:Stephane's attachements are at 
>   http://www.purebytes.com/archives/amibroker/2004/msg07780.html



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
     amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/